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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
036543a1fbcdcc35bf430e0b5d4150196450f6d6 | 4,910 | py | Python | mkpy3/mkpy3_finder_chart_survey_fits_image_get_v1.py | KenMighell/mkpy3 | 598126136b43fa93bc4aded5db65a1251d60a9ba | [
"MIT"
] | null | null | null | mkpy3/mkpy3_finder_chart_survey_fits_image_get_v1.py | KenMighell/mkpy3 | 598126136b43fa93bc4aded5db65a1251d60a9ba | [
"MIT"
] | null | null | null | mkpy3/mkpy3_finder_chart_survey_fits_image_get_v1.py | KenMighell/mkpy3 | 598126136b43fa93bc4aded5db65a1251d60a9ba | [
"MIT"
] | 1 | 2020-11-01T18:37:53.000Z | 2020-11-01T18:37:53.000Z | #!/usr/bin/env python3
# file://mkpy3_finder_chart_survey_fits_image_get_v1.py
# Kenneth Mighell
# SETI Institute
# =============================================================================
def mkpy3_finder_chart_survey_fits_image_get_v1(
ra_deg=None,
dec_deg=None,
radius_arcmin=None,
survey=No... | 26.684783 | 87 | 0.627495 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,100 | 0.427699 |
0366c6b949b300f8072c9d5d7dfdc2a101c2a39c | 1,737 | py | Python | marathontcp.py | StevenPG/JMXMarathonDataAggregator | a976edc2ea27255dca36f584923e3a06dbdec8c6 | [
"MIT"
] | null | null | null | marathontcp.py | StevenPG/JMXMarathonDataAggregator | a976edc2ea27255dca36f584923e3a06dbdec8c6 | [
"MIT"
] | null | null | null | marathontcp.py | StevenPG/JMXMarathonDataAggregator | a976edc2ea27255dca36f584923e3a06dbdec8c6 | [
"MIT"
] | null | null | null | """
marathontcp.py
Author: Steven Gantz
Date: 11/22/2016
These two classes are used as custom TCP Servers and its accompanying
handler that defines each request. These class are what forward the data
from the preset /metrics endpoints in the scaled marathon instances directly
to the TCP servers running from this appli... | 40.395349 | 110 | 0.727691 | 1,334 | 0.767991 | 0 | 0 | 0 | 0 | 0 | 0 | 910 | 0.523892 |
03672787b107ccc21fb75165c7801c0b958f1461 | 4,600 | py | Python | tests/test_io.py | Laharah/horcrux | 68f7c6aad0678b39bae888f0dfeb9d1926501a53 | [
"MIT"
] | null | null | null | tests/test_io.py | Laharah/horcrux | 68f7c6aad0678b39bae888f0dfeb9d1926501a53 | [
"MIT"
] | null | null | null | tests/test_io.py | Laharah/horcrux | 68f7c6aad0678b39bae888f0dfeb9d1926501a53 | [
"MIT"
] | null | null | null | import pytest
import io
import random
from copy import deepcopy
from horcrux import io as hio
from horcrux.hrcx_pb2 import StreamBlock
from horcrux.sss import Share, Point
@pytest.fixture()
def hx():
return hio.Horcrux(io.BytesIO())
@pytest.fixture()
def share():
return Share(b'0123456789abcdef', 2, Point... | 27.218935 | 88 | 0.668696 | 0 | 0 | 0 | 0 | 366 | 0.079565 | 0 | 0 | 786 | 0.17087 |
0369ea60607087cd24210a21d5453a467593c1f0 | 1,817 | py | Python | template/diff.py | Nauja/Entropy | e418a7db68a55f17fb3e6c0c3b5018aed7002d4d | [
"MIT"
] | null | null | null | template/diff.py | Nauja/Entropy | e418a7db68a55f17fb3e6c0c3b5018aed7002d4d | [
"MIT"
] | null | null | null | template/diff.py | Nauja/Entropy | e418a7db68a55f17fb3e6c0c3b5018aed7002d4d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
A Pandoc filter to create non-code diffs. `add` and `rm` are the classes that
can be added to a `Div` or a `Span`. `add` colors the text green, and `rm`
colors the text red. For HTML, `add` also underlines the text, and `rm` also
strikes out the text.
# Example
## `Div`
Unchanged portion... | 25.236111 | 79 | 0.555861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.316456 |
036a6e6b57ea2d5221b7c56f2e175c6cb9c0ca3b | 1,304 | py | Python | paxful/exceptions.py | tholness/Paxful-API-Wrapper | c66620aa2ef40b97f2794998c63a6bd7504cea3c | [
"MIT"
] | null | null | null | paxful/exceptions.py | tholness/Paxful-API-Wrapper | c66620aa2ef40b97f2794998c63a6bd7504cea3c | [
"MIT"
] | null | null | null | paxful/exceptions.py | tholness/Paxful-API-Wrapper | c66620aa2ef40b97f2794998c63a6bd7504cea3c | [
"MIT"
] | 3 | 2020-08-09T17:02:06.000Z | 2021-04-13T17:45:39.000Z | from __future__ import absolute_import, unicode_literals
class PaxfulError(Exception):
"""Base (catch-all) client exception."""
class RequestError(PaxfulError):
"""Raised when an API request to fails.
:ivar message: Error message.
:vartype message: str | unicode
:ivar url: API endpoint.
... | 28.977778 | 61 | 0.692485 | 1,235 | 0.947086 | 0 | 0 | 0 | 0 | 0 | 0 | 717 | 0.549847 |
036aded2a5c768db98446d290a146373009c9d4d | 382 | py | Python | examples/mesoscope_anatomical_high_mag.py | tlambert03/image-demos | a2974bcc7f040fd4d14e659c4cbfeabcf726c707 | [
"BSD-3-Clause"
] | null | null | null | examples/mesoscope_anatomical_high_mag.py | tlambert03/image-demos | a2974bcc7f040fd4d14e659c4cbfeabcf726c707 | [
"BSD-3-Clause"
] | null | null | null | examples/mesoscope_anatomical_high_mag.py | tlambert03/image-demos | a2974bcc7f040fd4d14e659c4cbfeabcf726c707 | [
"BSD-3-Clause"
] | null | null | null | """
Displays anatomical data from the mesoscope
"""
from skimage.io import imread
from napari import Viewer, gui_qt
stack = imread('data/mesoscope/anatomical/volume_zoomed.tif')
with gui_qt():
# create an empty viewer
viewer = Viewer()
# add the image
layer = viewer.add_image(stack, name='stack', c... | 22.470588 | 112 | 0.698953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.387435 |
036b561ed932ab60b4b97fb19bd96ddc0a940784 | 246 | py | Python | lab_restful/app/models/Paper.py | afish1001/lab_server | c6a2b09834d73078ab52e2965849cd41ba795b4b | [
"MIT"
] | null | null | null | lab_restful/app/models/Paper.py | afish1001/lab_server | c6a2b09834d73078ab52e2965849cd41ba795b4b | [
"MIT"
] | null | null | null | lab_restful/app/models/Paper.py | afish1001/lab_server | c6a2b09834d73078ab52e2965849cd41ba795b4b | [
"MIT"
] | null | null | null | from .. import utils
from ..config import table
class Paper():
def __init__(self):
self.collection = table.paper
self.conn = utils.mongo.db.get_collection(self.collection)
def list(self):
pass
paper = Paper()
| 16.4 | 66 | 0.642276 | 178 | 0.723577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
036bed92a5a2372689c9a48c62d3c2e337ec2c9b | 1,459 | py | Python | cogs/logs.py | CoffeeOrg/Coffee | 73bf194c3811bb9cf776a0a4db4c6234e471d5ce | [
"MIT"
] | 6 | 2021-02-06T05:43:40.000Z | 2021-08-01T22:55:33.000Z | cogs/logs.py | elfw/Coffee | e83868a323084b96b0df3f916090dd17ce34de93 | [
"MIT"
] | 2 | 2021-02-06T07:18:10.000Z | 2021-02-06T18:42:07.000Z | cogs/logs.py | elfw/Coffee | e83868a323084b96b0df3f916090dd17ce34de93 | [
"MIT"
] | 10 | 2021-02-06T03:31:26.000Z | 2021-09-22T04:00:23.000Z | import discord
from discord.ext import commands
from utils.database import sqlite, create_tables
class Events(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.db = sqlite.Database()
def logs(self, guild_id):
data = self.db.fetchrow("SELECT * FROM Logging WHERE guild_id=?", (guild_id,))... | 29.77551 | 154 | 0.651131 | 1,316 | 0.898294 | 0 | 0 | 993 | 0.677816 | 939 | 0.640956 | 337 | 0.230034 |
036c2e095d7edeb0d2e2e4cd895d6ea7fe8b4740 | 1,679 | py | Python | DataProcessor.py | harrys17451/CryptocurrencyPrediction | 4833130c59618f0b1d060596fd39a290e9a6ed97 | [
"MIT"
] | 669 | 2017-12-31T01:50:30.000Z | 2022-03-30T00:01:57.000Z | DataProcessor.py | mildronize/CryptocurrencyPrediction | 7ec542bcd6bf960b115638484737f097120badcd | [
"MIT"
] | 11 | 2018-01-08T15:40:55.000Z | 2021-11-30T08:00:49.000Z | DataProcessor.py | mildronize/CryptocurrencyPrediction | 7ec542bcd6bf960b115638484737f097120badcd | [
"MIT"
] | 262 | 2018-01-01T14:51:13.000Z | 2022-03-17T16:59:55.000Z |
# coding: utf-8
# In[2]:
import pandas as pd
import numpy as np
import h5py
# In[24]:
input_step_size = 50
output_size = 30
sliding_window = False
file_name= 'bitcoin2012_2017_50_30_prediction.h5'
# In[19]:
df = pd.read_csv('data/bitstampUSD_1-min_data_2012-01-01_to_2017-05-31.csv').dropna().tail(1000000)
... | 23.647887 | 99 | 0.705777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.148303 |
036ce936f710a0a2ff80b56468ee08342b668842 | 776 | py | Python | github api example.py | LincT/PythonExamples | a0b61e8c60cd0754f2406b6b72fcd562667c9bb0 | [
"MIT"
] | null | null | null | github api example.py | LincT/PythonExamples | a0b61e8c60cd0754f2406b6b72fcd562667c9bb0 | [
"MIT"
] | null | null | null | github api example.py | LincT/PythonExamples | a0b61e8c60cd0754f2406b6b72fcd562667c9bb0 | [
"MIT"
] | null | null | null | import requests
def wip():
print()
def apiToDictionary(url, *args):
request_string = url
response = (requests.get(request_string))
json = response.json()
response.close()
return dict(json)
def main():
# docDict = {"text":"592da8d73b39d3e1f54304fedf7456b1", "markdown":"6a4cccf1c66c780e72... | 29.846154 | 166 | 0.693299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 481 | 0.619845 |
036da6e027a7036bf7b62f5adb2656c36fb9601d | 325 | py | Python | elibrary/migrations/0011_remove_book_tag.py | soma115/wikikracja | 7715ca1daa4ca09888e1c7389ed5f8a2df29898b | [
"MIT"
] | 7 | 2016-02-21T17:25:54.000Z | 2021-10-09T19:36:10.000Z | elibrary/migrations/0011_remove_book_tag.py | soma115/wikikracja | 7715ca1daa4ca09888e1c7389ed5f8a2df29898b | [
"MIT"
] | 19 | 2020-02-11T23:55:01.000Z | 2022-03-31T18:11:56.000Z | elibrary/migrations/0011_remove_book_tag.py | soma115/wikikracja | 7715ca1daa4ca09888e1c7389ed5f8a2df29898b | [
"MIT"
] | 3 | 2016-01-20T22:34:58.000Z | 2020-09-16T07:45:42.000Z | # Generated by Django 3.1.12 on 2021-09-18 12:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('elibrary', '0010_auto_20210918_1434'),
]
operations = [
migrations.RemoveField(
model_name='book',
name='tag',
),
... | 18.055556 | 48 | 0.587692 | 239 | 0.735385 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.289231 |
036e27bede50c08e0bbb36a280baf4f71cc05bf8 | 15,933 | py | Python | tools/test/scenarios/bin/tapiHelper.py | cornell-netlab/onos | 19c32ac12d1ac3b58403cc8b763c6a0666702cb6 | [
"Apache-2.0"
] | 2 | 2019-04-02T03:48:49.000Z | 2021-02-03T20:01:27.000Z | tools/test/scenarios/bin/tapiHelper.py | cornell-netlab/onos | 19c32ac12d1ac3b58403cc8b763c6a0666702cb6 | [
"Apache-2.0"
] | 13 | 2020-03-04T22:56:25.000Z | 2022-03-02T04:24:17.000Z | tools/test/scenarios/bin/tapiHelper.py | cornell-netlab/onos | 19c32ac12d1ac3b58403cc8b763c6a0666702cb6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import requests
import json
import random
from sets import Set
#
# Creates client-side connectivity json
#
def tapi_client_input(sip_uuids):
create_input = {
"tapi-connectivity:input": {
"end-point" : [
{
"local-id": sip_uuids[... | 40.853846 | 136 | 0.62813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,580 | 0.412979 |
036e3669e539c1ee359752125217465762d9b017 | 4,151 | py | Python | scripts/text/text_particles.py | mou3adb/spread_the_particle | 6cc666fded62f07380ed1e3ed52969c436295906 | [
"MIT"
] | 4 | 2020-08-18T18:33:05.000Z | 2021-05-18T23:55:56.000Z | scripts/text/text_particles.py | mou3adb/spread_the_particle | 6cc666fded62f07380ed1e3ed52969c436295906 | [
"MIT"
] | null | null | null | scripts/text/text_particles.py | mou3adb/spread_the_particle | 6cc666fded62f07380ed1e3ed52969c436295906 | [
"MIT"
] | 2 | 2021-03-03T18:57:06.000Z | 2021-05-18T20:43:44.000Z | """
The outfile structure is the following:
diameter density
birth lifetime
is_captured stuck_to_geometry theta
(blank line)
Re Ur
(blank line)
n_trajectory
x1 y1 up1 vp1 Uf1 Vf1 gradpx1 gradpy1 ap_x1 ap_y1 af_x1 af_y1
x2 y2 up2 vp2 Uf2 Vf2 gradpx2 gradpy2 ap_x2 ap_y2 af_x2 af_y2
...
xNt yNt upNt vpNt UfNt VfNt gradpx... | 25.466258 | 79 | 0.578897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.170561 |
0371b2e5e808a3335687f6bb1d019e4b4c60e31e | 1,610 | py | Python | 01_Modelos_Supervisionados/1.2_Analise_Discriminante_Linear_e_Quadratica/1.2.3_Formulacao_Matematica_de_Reducao_de_Dimensionalidade_LDA.py | BrunoBertti/Scikit_Learning | 4b9e10ff7909f3728ac1e8bba19f5fd779340bc4 | [
"MIT"
] | null | null | null | 01_Modelos_Supervisionados/1.2_Analise_Discriminante_Linear_e_Quadratica/1.2.3_Formulacao_Matematica_de_Reducao_de_Dimensionalidade_LDA.py | BrunoBertti/Scikit_Learning | 4b9e10ff7909f3728ac1e8bba19f5fd779340bc4 | [
"MIT"
] | null | null | null | 01_Modelos_Supervisionados/1.2_Analise_Discriminante_Linear_e_Quadratica/1.2.3_Formulacao_Matematica_de_Reducao_de_Dimensionalidade_LDA.py | BrunoBertti/Scikit_Learning | 4b9e10ff7909f3728ac1e8bba19f5fd779340bc4 | [
"MIT"
] | null | null | null | ########## 1.2.3. Formulação matemática de redução de dimensionalidade LDA ##########
# Primeiro note que K significa que \mu_k são vetores em \mathcal{R}^d, e eles estão em um subespaço afim H de dimensão no máximo K - 1 (2 pontos estão em uma linha, 3 pontos estão em um plano, etc.) ).
# Como mencionado ac... | 161 | 479 | 0.778261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,642 | 0.985003 |
03740eb7b2e0fb107f339fc022308a8b7f886123 | 3,195 | py | Python | csrv/model/deck.py | mrroach/CentralServer | e377c65d8f3adf5a2d3273acd4f459be697aea56 | [
"Apache-2.0"
] | null | null | null | csrv/model/deck.py | mrroach/CentralServer | e377c65d8f3adf5a2d3273acd4f459be697aea56 | [
"Apache-2.0"
] | null | null | null | csrv/model/deck.py | mrroach/CentralServer | e377c65d8f3adf5a2d3273acd4f459be697aea56 | [
"Apache-2.0"
] | 1 | 2020-09-20T11:26:20.000Z | 2020-09-20T11:26:20.000Z | """A collection of cards."""
import random
from csrv.model import cards
from csrv.model.cards import card_info
# This import is just to pull in all the card definitions
import csrv.model.cards.corp
import csrv.model.cards.runner
class Deck(object):
def __init__(self, identity_name, card_names):
self.identity... | 35.10989 | 114 | 0.699531 | 2,956 | 0.925196 | 0 | 0 | 0 | 0 | 0 | 0 | 877 | 0.274491 |
03766bbc82ca9d0b806101dbc0e7af7f9c47c209 | 476 | py | Python | data_structures_and_algorithms/04_menu.py | dileepabandara/return-python | fc269d577eade231bc9e3813654ce9c5848837ca | [
"MIT"
] | 1 | 2022-01-12T17:44:51.000Z | 2022-01-12T17:44:51.000Z | data_structures_and_algorithms/04_menu.py | dileepabandara/return-python | fc269d577eade231bc9e3813654ce9c5848837ca | [
"MIT"
] | null | null | null | data_structures_and_algorithms/04_menu.py | dileepabandara/return-python | fc269d577eade231bc9e3813654ce9c5848837ca | [
"MIT"
] | null | null | null | ans = True
while ans:
print("""
1.Add a Student
2.Delete a Student
3.Look Up Student Record
4.Exit/Quit
""")
ans = input("What would you like to do? ")
if ans == "1":
print("\nStudent Added")
elif ans == "2":
print("\n Student Deleted")
elif ans == "3":
pr... | 22.666667 | 46 | 0.521008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.514706 |
0376ebb01bd1aa62d9b4075181468b5d09068e7f | 525 | py | Python | libok.py | txt/se4dm | c38c742039eaa7a15730eb655c4eed067c8a5409 | [
"Unlicense"
] | null | null | null | libok.py | txt/se4dm | c38c742039eaa7a15730eb655c4eed067c8a5409 | [
"Unlicense"
] | 9 | 2015-10-30T12:46:53.000Z | 2015-11-25T03:27:49.000Z | libok.py | txt/se4dm | c38c742039eaa7a15730eb655c4eed067c8a5409 | [
"Unlicense"
] | 2 | 2018-06-22T15:23:44.000Z | 2020-11-05T01:47:54.000Z | from __future__ import print_function, division
import sys
sys.dont_write_bytecode = True
from lib import *
@ok
def _rseed():
rseed(1)
one = list('abcdefghijklm')
assert shuffle(one) == ['m', 'h', 'j', 'f', 'a',
'g', 'l', 'd', 'e', 'c', 'i', 'k', 'b']
@ok
def _defDict():
d = DefaultDict(lambda: []... | 22.826087 | 50 | 0.491429 | 0 | 0 | 0 | 0 | 407 | 0.775238 | 0 | 0 | 87 | 0.165714 |
037803daf8f26a1fd6b807cb352e059357d3aa0d | 734 | py | Python | setup.py | ignalex/HAP-python | 855577cfcde1bf2f8562caf9fbefda3e4fa8b497 | [
"Apache-2.0"
] | 1 | 2018-09-23T20:44:46.000Z | 2018-09-23T20:44:46.000Z | setup.py | ignalex/HAP-python | 855577cfcde1bf2f8562caf9fbefda3e4fa8b497 | [
"Apache-2.0"
] | 1 | 2019-10-02T11:12:13.000Z | 2019-10-02T11:12:13.000Z | setup.py | ilyamordasov/HAP-python | 698eb612c35b5672c4aab9d7896093924cbd358c | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
import pyhap.const as pyhap_const
PROJECT_NAME = 'HAP-python'
URL = 'https://github.com/ikalchev/{}'.format(PROJECT_NAME)
PROJECT_URLS = {
'Bug Reports': '{}/issues'.format(URL),
'Documentation': 'http://hap-python.readthedocs.io/en/latest/',
'Source': '{}/tree/master'.format... | 27.185185 | 71 | 0.709809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.290191 |
037a4b8c8dc9b844a65be270c4263033b7498224 | 1,291 | py | Python | experiments/2014_PLOS-Comp-Bio_Wikidemics-feasibility/scrape_mmwr.py | casmlab/quac | f7b037b15f5ff0db1b9669159f645040abce1766 | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2015-01-10T05:44:02.000Z | 2021-05-18T02:57:19.000Z | experiments/2014_PLOS-Comp-Bio_Wikidemics-feasibility/scrape_mmwr.py | casmlab/quac | f7b037b15f5ff0db1b9669159f645040abce1766 | [
"ECL-2.0",
"Apache-2.0"
] | 14 | 2015-02-15T21:58:09.000Z | 2020-06-05T18:31:47.000Z | experiments/2014_PLOS-Comp-Bio_Wikidemics-feasibility/scrape_mmwr.py | casmlab/quac | f7b037b15f5ff0db1b9669159f645040abce1766 | [
"ECL-2.0",
"Apache-2.0"
] | 19 | 2015-02-08T02:24:15.000Z | 2020-11-07T13:39:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Scrape the MMWR morbidity tables at http://wonder.cdc.gov/mmwr/mmwrmorb.asp. No processing is done;
we simply save the files for potential offline processing.
"""
# Copyright (c) Los Alamos National Security, LLC and others.
from __future__ import print_function, d... | 32.275 | 130 | 0.670023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 587 | 0.454686 |
037b522742c7eb6098ac17119575246e7a1d22e3 | 6,970 | py | Python | cluster_status.py | jtimberlake/hyper-kube-config | d624f81e04d1560b584bb7b748451dd5181e15bf | [
"MIT"
] | 29 | 2018-10-11T17:34:33.000Z | 2019-10-09T04:24:22.000Z | cluster_status.py | silvermullet/kube-auth-store | a9c6966fe7b29e0bf80f9e40027310fd4a07dbc3 | [
"MIT"
] | 14 | 2018-12-18T18:14:19.000Z | 2019-10-19T18:38:12.000Z | cluster_status.py | silvermullet/kube-auth-store | a9c6966fe7b29e0bf80f9e40027310fd4a07dbc3 | [
"MIT"
] | 6 | 2018-11-06T09:32:40.000Z | 2019-10-17T18:18:08.000Z | import json
import logging
import os
import traceback
from boto3.dynamodb.conditions import Attr, Key
import storage
from util import lambda_result
logger = logging.getLogger('cluster_status')
if os.environ.get('DEBUG'):
logger.setLevel(logging.DEBUG)
def set_cluster_status(event, context):
"""Set the sta... | 32.877358 | 79 | 0.628264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,021 | 0.289957 |
037cb54aac999a27c21c13f841feb80028eba68f | 1,366 | py | Python | ote_sdk/ote_sdk/utils/labels_utils.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/utils/labels_utils.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/utils/labels_utils.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 1 | 2020-12-13T22:13:51.000Z | 2020-12-13T22:13:51.000Z | """
This module implements utilities for labels
"""
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from typing import List, Optional
from ote_sdk.entities.label import LabelEntity
from ote_sdk.entities.label_schema import LabelSchemaEntity
from ote_sdk.entities.scored_label impor... | 27.32 | 78 | 0.7306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.210835 |
cee01dc4ca892acb2cf457702c9a788e7276faf5 | 614 | py | Python | DSA/Python/src/dsa/lib/math/nums/tests/test_three_sum.py | JackieMa000/problems | c521558830a0bbf67f94109af92d7be4397d0a43 | [
"BSD-3-Clause"
] | null | null | null | DSA/Python/src/dsa/lib/math/nums/tests/test_three_sum.py | JackieMa000/problems | c521558830a0bbf67f94109af92d7be4397d0a43 | [
"BSD-3-Clause"
] | 1 | 2020-10-23T04:06:56.000Z | 2020-10-23T04:06:56.000Z | DSA/Python/src/dsa/lib/math/nums/tests/test_three_sum.py | JackieMa000/problems | c521558830a0bbf67f94109af92d7be4397d0a43 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from typing import List
from dsa.lib.math.nums.three_sum import ThreeSum
class ThreeSumTest(unittest.TestCase):
def test_case1(self):
self.assertEqual([[0, 0, 0]], self.three_sum([0, 0, 0, 0]))
self.assertEqual([[-2, 0, 2]], self.three_sum([-2, 0, 0, 2, 2]))
self.assertEqu... | 30.7 | 72 | 0.571661 | 521 | 0.848534 | 0 | 0 | 90 | 0.14658 | 0 | 0 | 0 | 0 |
cee3692c9f60cfa65662bb7421bd3d405f7b7920 | 4,329 | py | Python | meggie/actions/spectrum_plot/controller/spectrum.py | Teekuningas/meggie | 0790559febb990a5487d4f0c92987066632e1d99 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2020-04-29T08:57:11.000Z | 2021-01-15T21:21:51.000Z | meggie/actions/spectrum_plot/controller/spectrum.py | Teekuningas/meggie | 0790559febb990a5487d4f0c92987066632e1d99 | [
"BSD-2-Clause-FreeBSD"
] | 16 | 2019-05-03T10:31:16.000Z | 2021-05-06T14:59:55.000Z | meggie/actions/spectrum_plot/controller/spectrum.py | cibr-jyu/meggie | 0790559febb990a5487d4f0c92987066632e1d99 | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2020-12-12T09:57:00.000Z | 2020-12-20T17:12:05.000Z | """ Contains functions for plot spectrum action
"""
import mne
import numpy as np
import matplotlib.pyplot as plt
from meggie.utilities.plotting import color_cycle
from meggie.utilities.plotting import create_channel_average_plot
from meggie.utilities.channels import average_to_channel_groups
from meggie.utilities.c... | 30.921429 | 85 | 0.612151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.057519 |
cee4ceb0af01d56f99e0400de26b6a95df4511da | 70 | py | Python | torchrl/runners/__init__.py | srikarym/torchrl | fee98e78ac1657a2c9a4063dd8d63ba207a121e2 | [
"Apache-2.0"
] | 3 | 2019-02-27T19:00:32.000Z | 2020-07-19T03:18:28.000Z | torchrl/runners/__init__.py | srikarym/torchrl | fee98e78ac1657a2c9a4063dd8d63ba207a121e2 | [
"Apache-2.0"
] | null | null | null | torchrl/runners/__init__.py | srikarym/torchrl | fee98e78ac1657a2c9a4063dd8d63ba207a121e2 | [
"Apache-2.0"
] | null | null | null | from .base_runner import BaseRunner
from .gym_runner import GymRunner
| 23.333333 | 35 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cee59d1b21ebd4c01ff98f1b398ff22e296663a6 | 7,733 | py | Python | data/cyclesps.py | DawyD/UNet-PS-4D | bdd31308854dbd5f309aec9bcc1f7a35f267481d | [
"MIT"
] | 1 | 2021-12-06T17:20:36.000Z | 2021-12-06T17:20:36.000Z | data/cyclesps.py | DawyD/UNet-PS-4D | bdd31308854dbd5f309aec9bcc1f7a35f267481d | [
"MIT"
] | null | null | null | data/cyclesps.py | DawyD/UNet-PS-4D | bdd31308854dbd5f309aec9bcc1f7a35f267481d | [
"MIT"
] | 3 | 2021-12-06T08:09:42.000Z | 2022-03-12T08:09:34.000Z | """
DataGenerator for CyclesPS Dataset
This file use substantial portion of code from the original CNN-PS repository https://github.com/satoshi-ikehata/CNN-PS/
"""
import numpy as np
import cv2
import os
import gc
from data.datagenerator import DataGenerator
from data.utils import rotate_images
from misc.projections ... | 40.915344 | 120 | 0.557869 | 7,346 | 0.949955 | 0 | 0 | 2,943 | 0.380577 | 0 | 0 | 1,045 | 0.135135 |
cee7987780f9d6caf6c5e3e7b2bc8abfa821e3a8 | 2,105 | py | Python | p1_basic/day22_26oop/day26/04_异常处理.py | dong-pro/fullStackPython | 5ad8662f7b57f14c8529e7eaf64290eeda773557 | [
"Apache-2.0"
] | 1 | 2020-04-03T01:32:05.000Z | 2020-04-03T01:32:05.000Z | p1_basic/day22_26oop/day26/04_异常处理.py | dong-pro/fullStackPython | 5ad8662f7b57f14c8529e7eaf64290eeda773557 | [
"Apache-2.0"
] | null | null | null | p1_basic/day22_26oop/day26/04_异常处理.py | dong-pro/fullStackPython | 5ad8662f7b57f14c8529e7eaf64290eeda773557 | [
"Apache-2.0"
] | null | null | null | import os
class ExistsError(Exception):
pass
class KeyInvalidError(Exception):
pass
def new_func(path, prev):
"""
去path路径的文件中,找到前缀为prev的一行数据,获取数据并返回给调用者。
1000,成功
1001,文件不存在
1002,关键字为空
1003,未知错误
...
:return:
"""
response = {'code': 1000, 'data': None... | 21.262626 | 45 | 0.535392 | 192 | 0.078785 | 0 | 0 | 0 | 0 | 0 | 0 | 1,493 | 0.612638 |
cee901804439796dcdaf795233ffadc0af103dcb | 183 | py | Python | hackerrank/Python/Hex Color Code/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/Python/Hex Color Code/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/Python/Hex Color Code/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | import re
for _ in range(0, int(input())):
matches = re.findall(r'(#(?:[\da-f]{3}){1,2})(?!\w)(?=.*;)', input(), re.IGNORECASE)
if matches:
print(*matches, sep='\n')
| 26.142857 | 88 | 0.513661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.229508 |
ceea1cba85bb3d624953e8ecf28fb6d54fd02614 | 4,429 | py | Python | code/vocabulary.py | TimothyBenger/knausj_talon | 10c2440fb3646abda1adc84ca9fd230f752eb353 | [
"MIT"
] | null | null | null | code/vocabulary.py | TimothyBenger/knausj_talon | 10c2440fb3646abda1adc84ca9fd230f752eb353 | [
"MIT"
] | null | null | null | code/vocabulary.py | TimothyBenger/knausj_talon | 10c2440fb3646abda1adc84ca9fd230f752eb353 | [
"MIT"
] | null | null | null | from talon import Context, Module
from .user_settings import get_list_from_csv
mod = Module()
ctx = Context()
mod.list("vocabulary", desc="additional vocabulary words")
# Default words that will need to be capitalized (particularly under w2l).
# NB. These defaults and those later in this file are ONLY used when
# a... | 29.925676 | 121 | 0.64326 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,143 | 0.709641 |
ceeab48dfbbd65bcb363f2bc14497327bbed9e95 | 451 | py | Python | api/src/controllers/utils.py | debbie-chan/SPM | f84e62779347579287aee8a2e832f72dcc53b8dd | [
"MIT"
] | null | null | null | api/src/controllers/utils.py | debbie-chan/SPM | f84e62779347579287aee8a2e832f72dcc53b8dd | [
"MIT"
] | null | null | null | api/src/controllers/utils.py | debbie-chan/SPM | f84e62779347579287aee8a2e832f72dcc53b8dd | [
"MIT"
] | null | null | null | import json
from bson import ObjectId
from datetime import datetime, date
class JSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, ObjectId):
return str(o)
if isinstance(o, (datetime, date)):
return o.isoformat()
return json.JSONEncoder.default(se... | 25.055556 | 70 | 0.643016 | 371 | 0.822616 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.068736 |
ceed5b9c4d3963ebe8a8bb9c365ef1238097db1b | 390 | py | Python | tests/basics/try_reraise.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | 7 | 2019-10-18T13:41:39.000Z | 2022-03-15T17:27:57.000Z | tests/basics/try_reraise.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | null | null | null | tests/basics/try_reraise.py | geowor01/micropython | 7fb13eeef4a85f21cae36f1d502bcc53880e1815 | [
"MIT"
] | 2 | 2020-06-23T09:10:15.000Z | 2020-12-22T06:42:14.000Z | # Reraising last exception with raise w/o args
def f():
try:
raise ValueError("val", 3)
print("FAIL")
raise SystemExit
except:
raise
try:
f()
print("FAIL")
raise SystemExit
except ValueError as e:
pass
# Can reraise only in except block
try:
raise
prin... | 15 | 46 | 0.602564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.279487 |
ceee787626ea63b9ebed145fa361e93cb187c722 | 494 | py | Python | molecule/default/tests/test_role.py | gantsign/ansible-role-git-credential-manager | 63c9d20389447ea9a38b56a6198a385fdebe1718 | [
"MIT"
] | 3 | 2018-09-04T15:53:22.000Z | 2020-06-13T17:22:47.000Z | molecule/default/tests/test_role.py | gantsign/ansible_role_git_credential_manager | b718d4133a272f766719acca5afa8e1999a4588d | [
"MIT"
] | 1 | 2018-09-04T16:02:20.000Z | 2018-09-05T14:45:34.000Z | molecule/default/tests/test_role.py | gantsign/ansible_role_git_credential_manager | b718d4133a272f766719acca5afa8e1999a4588d | [
"MIT"
] | null | null | null | import re
def test_version(host):
version = host.check_output('git-credential-manager-core --version')
pattern = r'[0-9\.]+(\.[0-9\.]+){2}'
assert re.search(pattern, version)
def test_git_config(host):
config = host.check_output('git config --system credential.helper')
assert config == '/usr/loc... | 30.875 | 76 | 0.688259 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.449393 |
ceef88b42a5304577b2b39be8918b4680ae52465 | 9,605 | py | Python | upetem_service.py | myroslav/robot_tests.broker.upetem | 323314259faa60618113fbc37b5e1f1d79c2192b | [
"Apache-2.0"
] | null | null | null | upetem_service.py | myroslav/robot_tests.broker.upetem | 323314259faa60618113fbc37b5e1f1d79c2192b | [
"Apache-2.0"
] | null | null | null | upetem_service.py | myroslav/robot_tests.broker.upetem | 323314259faa60618113fbc37b5e1f1d79c2192b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from datetime import datetime, timedelta
import dateutil.parser
import pytz
import urllib
TZ = pytz.timezone('Europe/Kiev')
def adapt_data(data):
data['data']['procuringEntity']['name'] = 'testuser_tender_owner'
for x in data['data']['items']:
x['unit']['name'] = get_unit_name(x['... | 30.785256 | 158 | 0.639771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,918 | 0.383403 |
ceefdd4f273021acf57a211bf9db5e4727c86333 | 1,638 | py | Python | sway/tiling-indicator.py | iziGor/scripts | 0076711ab6c423d97c2dad72119fbd57e27fb250 | [
"BSD-2-Clause"
] | null | null | null | sway/tiling-indicator.py | iziGor/scripts | 0076711ab6c423d97c2dad72119fbd57e27fb250 | [
"BSD-2-Clause"
] | null | null | null | sway/tiling-indicator.py | iziGor/scripts | 0076711ab6c423d97c2dad72119fbd57e27fb250 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
""" Show split layout indicator
Usage:
./tiling-indicator.py
Suppoused to be used inside waybar or polybar.
Config example:
Waybar:
"custom/ws": {
"exec": "python -u $HOME/.config/sway/scripts/tiling-indicator-2.py 2> /dev/null
}
Polybar:
[module/layout]
type = custom/script
exec... | 22.135135 | 93 | 0.582418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,172 | 0.715507 |
cef07786e7e7ac506670e6c1114e7cf83e1eb3a0 | 5,822 | py | Python | cogs/tags.py | Chrovo/Productivity | 4bdb7eecfb8ae16b013ce58a1b0421f8f791499e | [
"MIT"
] | null | null | null | cogs/tags.py | Chrovo/Productivity | 4bdb7eecfb8ae16b013ce58a1b0421f8f791499e | [
"MIT"
] | null | null | null | cogs/tags.py | Chrovo/Productivity | 4bdb7eecfb8ae16b013ce58a1b0421f8f791499e | [
"MIT"
] | null | null | null | from typing import Optional
import discord
import asyncpg
from discord.ext import commands
from .utils.pagination import create_paginated_embed
class Tags(commands.Cog):
"""Productivity's tag system."""
def __init__(self, bot:commands.Bot) -> None:
self.bot = bot
self.emoji = "🏷️ "
asy... | 39.605442 | 124 | 0.5663 | 5,623 | 0.964991 | 0 | 0 | 4,940 | 0.847778 | 4,619 | 0.792689 | 1,724 | 0.295864 |
cef1f91b5f6b4d828f87bc4bbe7d153aead9af59 | 1,078 | py | Python | app.py | lblod/contact-hub-harvester | 75895a1920b3bae10f61e4f284499e2b23927609 | [
"MIT"
] | 1 | 2021-06-08T07:58:24.000Z | 2021-06-08T07:58:24.000Z | app.py | lblod/contact-hub-harvester | 75895a1920b3bae10f61e4f284499e2b23927609 | [
"MIT"
] | null | null | null | app.py | lblod/contact-hub-harvester | 75895a1920b3bae10f61e4f284499e2b23927609 | [
"MIT"
] | null | null | null | import sys
import mapping.organization as org
import mapping.contact as contact
import mapping.worship as worship
import mapping.central as central
import mapping.national as national
import mapping.codelist as codelist
import mapping.vocabulary as vocab
import mapping.location as location
import mapping.local_admin_... | 26.292683 | 51 | 0.681818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.102041 |
cef4a8a3cb987de3e3d820dc98bcefb1e7cbe272 | 2,815 | py | Python | ML_CW2/assgn_2/task_1.py | ShellySrivastava/Machine-Learning | bfdea30c06abe4228c103ae525adcf990015983f | [
"MIT"
] | null | null | null | ML_CW2/assgn_2/task_1.py | ShellySrivastava/Machine-Learning | bfdea30c06abe4228c103ae525adcf990015983f | [
"MIT"
] | null | null | null | ML_CW2/assgn_2/task_1.py | ShellySrivastava/Machine-Learning | bfdea30c06abe4228c103ae525adcf990015983f | [
"MIT"
] | null | null | null | import numpy as np
import os
import matplotlib.pyplot as plt
from print_values import *
from plot_data_all_phonemes import *
from plot_data import *
# File that contains the data
data_npy_file = 'data/PB_data.npy'
# Loading data from .npy file
data = np.load(data_npy_file, allow_pickle=True)
data = np.ndarray.tolist(... | 34.329268 | 157 | 0.694494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,759 | 0.624867 |
cef51d1bebab54bc43146e3a95ff04dc8d153fb9 | 459 | py | Python | students/migrations/0006_auto_20200403_2355.py | Davy-71993/MySchool | fa02c8ec19d71873fc0d714cf652d8ad05f2f0e7 | [
"MIT"
] | null | null | null | students/migrations/0006_auto_20200403_2355.py | Davy-71993/MySchool | fa02c8ec19d71873fc0d714cf652d8ad05f2f0e7 | [
"MIT"
] | null | null | null | students/migrations/0006_auto_20200403_2355.py | Davy-71993/MySchool | fa02c8ec19d71873fc0d714cf652d8ad05f2f0e7 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2020-04-03 20:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('students', '0005_subject'),
]
operations = [
migrations.RemoveField(
model_name='subject',
name='papers',
),
... | 19.125 | 47 | 0.538126 | 374 | 0.814815 | 0 | 0 | 0 | 0 | 0 | 0 | 104 | 0.22658 |
cef53f21d6ccfd1533b28e30e6717c9396761c37 | 4,027 | py | Python | terminalgame/world.py | naslundx/terminalgame | d855ec33ff8a057b1308ad30c54f138343baf56f | [
"MIT"
] | null | null | null | terminalgame/world.py | naslundx/terminalgame | d855ec33ff8a057b1308ad30c54f138343baf56f | [
"MIT"
] | null | null | null | terminalgame/world.py | naslundx/terminalgame | d855ec33ff8a057b1308ad30c54f138343baf56f | [
"MIT"
] | null | null | null | import curses
from contextlib import contextmanager
from time import sleep
from typing import List, Tuple, TYPE_CHECKING
from .actions import Action
from .properties import Property
if TYPE_CHECKING:
from .object import Object
class World:
class __World:
def __init__(self, fps: int, render: bool = T... | 31.217054 | 83 | 0.48746 | 3,791 | 0.941396 | 96 | 0.023839 | 343 | 0.085175 | 0 | 0 | 128 | 0.031785 |
cef7afd517df5ca0ce5466fa5f955c031bbbb177 | 223 | py | Python | src/projects/tests/factories/package.py | unikubehq/projects | 0df69eafa2a0d2664a22c7a5866d4512ac4d57fe | [
"Apache-2.0"
] | 1 | 2021-10-05T13:17:03.000Z | 2021-10-05T13:17:03.000Z | src/projects/tests/factories/package.py | unikubehq/projects | 0df69eafa2a0d2664a22c7a5866d4512ac4d57fe | [
"Apache-2.0"
] | 48 | 2021-07-06T07:24:36.000Z | 2022-03-24T08:27:30.000Z | src/projects/tests/factories/package.py | unikubehq/projects | 0df69eafa2a0d2664a22c7a5866d4512ac4d57fe | [
"Apache-2.0"
] | null | null | null | import factory
from projects.tests.factories.project import ProjectFactory
class DeckFactory(factory.DjangoModelFactory):
class Meta:
model = "projects.Deck"
project = factory.SubFactory(ProjectFactory)
| 20.272727 | 59 | 0.766816 | 144 | 0.64574 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.067265 |
cef7c80ce2c92bb1a2333400473042e3222f6983 | 1,012 | py | Python | data/data-pipeline/data_pipeline/etl/constants.py | vim-usds/justice40-tool | 6691df3e318b531b0e05454a79b8560b7d307b36 | [
"CC0-1.0"
] | null | null | null | data/data-pipeline/data_pipeline/etl/constants.py | vim-usds/justice40-tool | 6691df3e318b531b0e05454a79b8560b7d307b36 | [
"CC0-1.0"
] | null | null | null | data/data-pipeline/data_pipeline/etl/constants.py | vim-usds/justice40-tool | 6691df3e318b531b0e05454a79b8560b7d307b36 | [
"CC0-1.0"
] | null | null | null | DATASET_LIST = [
{
"name": "tree_equity_score",
"module_dir": "tree_equity_score",
"class_name": "TreeEquityScoreETL",
},
{
"name": "census_acs",
"module_dir": "census_acs",
"class_name": "CensusACSETL",
},
{
"name": "ejscreen",
"module... | 23.534884 | 51 | 0.528656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 608 | 0.600791 |
cef85293a8bebf5de04a9c7c28c2ecb0f768bbf3 | 129 | py | Python | alcor/models/__init__.py | wolvespack/alcor | dcc6b029ab7e6eb96b65b7b996cf335c3b030649 | [
"MIT"
] | 2 | 2017-05-02T11:36:46.000Z | 2017-05-02T14:01:16.000Z | alcor/models/__init__.py | wolvespack/alcor | dcc6b029ab7e6eb96b65b7b996cf335c3b030649 | [
"MIT"
] | 14 | 2017-10-15T20:13:23.000Z | 2017-12-03T17:00:30.000Z | alcor/models/__init__.py | wolvespack/alcor | dcc6b029ab7e6eb96b65b7b996cf335c3b030649 | [
"MIT"
] | null | null | null | from .group import Group
from .star import (STAR_PARAMETERS_NAMES,
GalacticDiskType,
Star)
| 25.8 | 41 | 0.581395 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cef8e48081ec1240c8d15a802e15c821eaaffb84 | 1,064 | py | Python | cfc_app/migrations/0005_auto_20201024_0139.py | ephyle/Legit-Info | 7f3845563a64299aa64e4fdba75949276ed9a711 | [
"BSD-2-Clause",
"CC-BY-4.0",
"Apache-2.0"
] | 44 | 2020-10-19T13:06:10.000Z | 2022-01-23T10:56:31.000Z | cfc_app/migrations/0005_auto_20201024_0139.py | ephyle/Legit-Info | 7f3845563a64299aa64e4fdba75949276ed9a711 | [
"BSD-2-Clause",
"CC-BY-4.0",
"Apache-2.0"
] | 111 | 2020-10-20T22:12:58.000Z | 2022-03-28T00:25:13.000Z | cfc_app/migrations/0005_auto_20201024_0139.py | ephyle/Legit-Info | 7f3845563a64299aa64e4fdba75949276ed9a711 | [
"BSD-2-Clause",
"CC-BY-4.0",
"Apache-2.0"
] | 31 | 2021-02-08T22:32:37.000Z | 2022-03-11T10:57:29.000Z | # Generated by Django 3.0.8 on 2020-10-24 01:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cfc_app', '0004_auto_20201024_0133'),
]
operations = [
migrations.AlterField(
model_name='hash',
name='fob_method',
... | 27.282051 | 67 | 0.56391 | 971 | 0.912594 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.156015 |
cefa905aac2153e51d910363e7adb666340184b1 | 1,955 | py | Python | e2e/test_get.py | sturzl/guet | b8c453f07968b689b303e20e7a31b405c02c54ef | [
"Apache-2.0"
] | null | null | null | e2e/test_get.py | sturzl/guet | b8c453f07968b689b303e20e7a31b405c02c54ef | [
"Apache-2.0"
] | null | null | null | e2e/test_get.py | sturzl/guet | b8c453f07968b689b303e20e7a31b405c02c54ef | [
"Apache-2.0"
] | null | null | null | from e2e import DockerTest
class TestGet(DockerTest):
def test_get_current_prints_currently_set_committers(self):
self.guet_init()
self.git_init()
self.guet_add('initials1', 'name1', 'email1')
self.guet_add('initials2', 'name2', 'email2')
self.guet_start()
self.guet... | 38.333333 | 89 | 0.658824 | 1,925 | 0.984655 | 0 | 0 | 0 | 0 | 0 | 0 | 569 | 0.291049 |
cefb3f843b82b1bef9a3afd4b8e0d08adb19182d | 175 | py | Python | code/eda.py | rodriggs/twosigmafinancial | a8ad216a71e4bb3fbfbd606281b101b845eae961 | [
"MIT"
] | null | null | null | code/eda.py | rodriggs/twosigmafinancial | a8ad216a71e4bb3fbfbd606281b101b845eae961 | [
"MIT"
] | null | null | null | code/eda.py | rodriggs/twosigmafinancial | a8ad216a71e4bb3fbfbd606281b101b845eae961 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import h5py
# docker run -it kagglegym
# python
# >>> import kagglegym
# >>> kagglegym.test()
train = pd.read_hdf("../data/train.h5")
| 15.909091 | 39 | 0.691429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.548571 |
cefe60a9049748b68fc54c632b52a7d08d5a4d7b | 442 | py | Python | w3r-basic-1-50.py | WLi-syd/python | e8bd743535a1eca3493ea7f74a7475d1fb49de98 | [
"CNRI-Python"
] | null | null | null | w3r-basic-1-50.py | WLi-syd/python | e8bd743535a1eca3493ea7f74a7475d1fb49de98 | [
"CNRI-Python"
] | null | null | null | w3r-basic-1-50.py | WLi-syd/python | e8bd743535a1eca3493ea7f74a7475d1fb49de98 | [
"CNRI-Python"
] | null | null | null | # 50. Write a Python program to print without newline or space.
# Question:
# Input:
# Output:
# Solution: https://www.w3resource.com/python-exercises/python-basic-exercise-50.php
# Ideas:
"""
1. Badly phrased qquestion. Question should be using for loop to generate 10 off "*" and print them in one line.
"""
# St... | 15.241379 | 114 | 0.624434 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.843891 |
ceffd051d030d11340ed2510ffc0183d9860e640 | 1,559 | py | Python | chris_backend/servicefiles/models.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | null | null | null | chris_backend/servicefiles/models.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | null | null | null | chris_backend/servicefiles/models.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | null | null | null |
from django.db import models
import django_filters
from django_filters.rest_framework import FilterSet
REGISTERED_SERVICES = ['PACS']
class Service(models.Model):
identifier = models.CharField(max_length=20, unique=True)
def __str__(self):
return self.identifier
class ServiceFile(models.Model):
... | 35.431818 | 89 | 0.667736 | 1,413 | 0.90635 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.146248 |
cefff0cd7583924688b44d3f4da180ddf1bf3140 | 1,813 | py | Python | lesion_tool/waimea.py | alaurent4/nighres | ffb4a478a224190ffe0112f7e4d214ad6825716e | [
"Apache-2.0"
] | null | null | null | lesion_tool/waimea.py | alaurent4/nighres | ffb4a478a224190ffe0112f7e4d214ad6825716e | [
"Apache-2.0"
] | null | null | null | lesion_tool/waimea.py | alaurent4/nighres | ffb4a478a224190ffe0112f7e4d214ad6825716e | [
"Apache-2.0"
] | 1 | 2019-01-21T10:53:38.000Z | 2019-01-21T10:53:38.000Z | #!/usr/bin/env python
"""
"""
from xml.etree.ElementTree import Element
import xml.etree.ElementTree as etree
import xml.dom.minidom
import re
import sys
import getopt
import os
from time import gmtime, strftime
from nipype import config, logging
from nighres.lesion_tool.lesion_pipeline import Lesion_extractor
d... | 29.241935 | 117 | 0.529509 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 440 | 0.242692 |
3002f09ad0b6466dc363ed3ed13747fd93bb53e6 | 2,208 | py | Python | system/__init__.py | JHUAPL/meta-system | d3e80e50d64e1a9e83d81efbcb8de1ec9cc34e03 | [
"Apache-2.0"
] | 5 | 2021-07-30T00:59:59.000Z | 2022-03-23T16:52:46.000Z | system/__init__.py | JHUAPL/meta-system | d3e80e50d64e1a9e83d81efbcb8de1ec9cc34e03 | [
"Apache-2.0"
] | null | null | null | system/__init__.py | JHUAPL/meta-system | d3e80e50d64e1a9e83d81efbcb8de1ec9cc34e03 | [
"Apache-2.0"
] | null | null | null | # **********************************************************************
# Copyright (C) 2020 Johns Hopkins University Applied Physics Laboratory
#
# All Rights Reserved.
# For any other permission, please contact the Legal Office at JHU/APL.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# y... | 32.955224 | 87 | 0.682065 | 958 | 0.433877 | 0 | 0 | 0 | 0 | 0 | 0 | 859 | 0.38904 |
30030def9ba42ea5610ba31e8842674e5faf76f9 | 80 | py | Python | demo/py/constants.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | 1 | 2019-02-03T08:41:52.000Z | 2019-02-03T08:41:52.000Z | demo/py/constants.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | null | null | null | demo/py/constants.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | null | null | null | # Constants
DEFAULT_TITLE = 'Khan Academy'
HOME_DOMAIN = 'www.khanacademy.org'
| 16 | 35 | 0.7625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.575 |
3003b7db9f50c73f072be5e7001460eee57f2c46 | 1,950 | py | Python | indexes/utils/dataset.py | war-and-peace/dss | 8980477fc118b4f6fc2724427ba101c80eeb69d3 | [
"MIT"
] | null | null | null | indexes/utils/dataset.py | war-and-peace/dss | 8980477fc118b4f6fc2724427ba101c80eeb69d3 | [
"MIT"
] | 6 | 2021-02-24T21:40:27.000Z | 2021-03-11T21:35:28.000Z | indexes/utils/dataset.py | war-and-peace/dss | 8980477fc118b4f6fc2724427ba101c80eeb69d3 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Abdurasul Rakhimov 24.2.2021.
# ------------------------------------------------------------------------------
import numpy as np
from overrides import overrides
class Dataset:
def __init__(self, name, dataset_path)... | 29.545455 | 117 | 0.567179 | 1,683 | 0.863077 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.105641 |
3004b0eda50f3f009063212317a8fd0157f3b144 | 369 | py | Python | tools/configen/example/gen/configen/samples/user/conf/User.py | wpc/hydra | 43b8a0f06eaf80f75810cc249e1eaa8a211e39c4 | [
"MIT"
] | 1 | 2021-02-23T00:00:20.000Z | 2021-02-23T00:00:20.000Z | tools/configen/example/gen/configen/samples/user/conf/User.py | wpc/hydra | 43b8a0f06eaf80f75810cc249e1eaa8a211e39c4 | [
"MIT"
] | null | null | null | tools/configen/example/gen/configen/samples/user/conf/User.py | wpc/hydra | 43b8a0f06eaf80f75810cc249e1eaa8a211e39c4 | [
"MIT"
] | null | null | null | # Generated by configen, do not edit.
# See https://github.com/facebookresearch/hydra/tree/master/tools/configen
# fmt: off
# isort:skip_file
# flake8: noqa
from dataclasses import dataclass
from typing import *
from omegaconf import MISSING
@dataclass
class UserConf:
_target_: str = "configen.samples.user.User... | 20.5 | 74 | 0.742547 | 111 | 0.300813 | 0 | 0 | 122 | 0.330623 | 0 | 0 | 180 | 0.487805 |
3004c3f59cd9236cf1638000226994613db59de2 | 733 | py | Python | src/kinect/Kinect.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | 7 | 2015-11-27T09:53:32.000Z | 2021-01-13T17:35:54.000Z | src/kinect/Kinect.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | src/kinect/Kinect.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | import time
import numpy as np
from freenect import sync_get_depth as get_depth, sync_get_video as get_video
class Kinect(object):
"""Offers access to rgb and depth from the real Kinect"""
def __init__(self):
pass
def get_frame(self, record=False):
# Get a fresh frame
(d... | 31.869565 | 78 | 0.604366 | 619 | 0.844475 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.14734 |
30050dc99f412b59d4c595ff2aeb87a711b709c5 | 1,262 | py | Python | main.py | hakierspejs/corononews | f1103da57d5c39694649bf7d7ba7748541dcfbe0 | [
"WTFPL"
] | null | null | null | main.py | hakierspejs/corononews | f1103da57d5c39694649bf7d7ba7748541dcfbe0 | [
"WTFPL"
] | null | null | null | main.py | hakierspejs/corononews | f1103da57d5c39694649bf7d7ba7748541dcfbe0 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python
import flask
import requests
import lxml.html
import logging
app = flask.Flask(__name__)
LOGGER = logging.getLogger(__name__)
HN_BASE_URL = 'https://news.ycombinator.com/'
def has_virus(url):
if not url.startswith('http://') and not url.startswith('https://'):
return True
s = re... | 28.681818 | 72 | 0.568938 | 0 | 0 | 0 | 0 | 723 | 0.5729 | 0 | 0 | 388 | 0.307448 |
3007056835a3f4cdbc36d9cf5d7aec07fbd6a6ae | 7,134 | py | Python | code/func/func.py | lindenmp/neurodev_long | d6efc6b2e212bc6fc0669c80efcfa0b67d1e4b06 | [
"MIT"
] | null | null | null | code/func/func.py | lindenmp/neurodev_long | d6efc6b2e212bc6fc0669c80efcfa0b67d1e4b06 | [
"MIT"
] | 5 | 2020-03-24T17:56:29.000Z | 2021-12-13T20:35:48.000Z | code/func/func.py | lindenmp/neurodev_long | d6efc6b2e212bc6fc0669c80efcfa0b67d1e4b06 | [
"MIT"
] | null | null | null | # Functions for project: NormativeNeuroDev_Longitudinal
# Linden Parkes, 2019
# [email protected]
from IPython.display import clear_output
import numpy as np
import scipy as sp
from scipy import stats
import pandas as pd
from statsmodels.stats import multitest
def get_cmap(which_type = 'qual1', num_classes = 8... | 36.963731 | 123 | 0.528595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 999 | 0.140034 |
3007a5e506648223a9acc7a03be0c3a03d473f6f | 15,808 | py | Python | sympy/simplify/sqrtdenest.py | goodok/sympy | de84ed2139125a755ea7b6ba91d945d9fbbe5ed9 | [
"BSD-3-Clause"
] | 2 | 2015-05-11T12:26:38.000Z | 2016-08-19T00:11:03.000Z | sympy/simplify/sqrtdenest.py | goodok/sympy | de84ed2139125a755ea7b6ba91d945d9fbbe5ed9 | [
"BSD-3-Clause"
] | null | null | null | sympy/simplify/sqrtdenest.py | goodok/sympy | de84ed2139125a755ea7b6ba91d945d9fbbe5ed9 | [
"BSD-3-Clause"
] | null | null | null | from sympy.functions import sqrt, sign, root
from sympy.core import S, Wild, sympify, Mul, Add, Expr
from sympy.core.function import expand_multinomial, expand_mul
from sympy.core.symbol import Dummy
from sympy.polys import Poly, PolynomialError
from sympy.core.function import count_ops
def _mexpand(expr):
return ... | 32.459959 | 79 | 0.546748 | 54 | 0.003416 | 0 | 0 | 0 | 0 | 0 | 0 | 6,575 | 0.415929 |
3007da11fc7ae07380226f4b542b097442751381 | 17,074 | py | Python | backend/modules/doc/views/doc.py | YouFacai/iWiki | 7a2cbb514f25b72932b0212f6165cdb426243243 | [
"MIT"
] | null | null | null | backend/modules/doc/views/doc.py | YouFacai/iWiki | 7a2cbb514f25b72932b0212f6165cdb426243243 | [
"MIT"
] | null | null | null | backend/modules/doc/views/doc.py | YouFacai/iWiki | 7a2cbb514f25b72932b0212f6165cdb426243243 | [
"MIT"
] | null | null | null | import datetime
import os
import shutil
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.cache import cache
from django.db import transaction, IntegrityError
from django.db.models import Q, F
from django.http import FileResponse
from django.utils.encoding import escape_u... | 38.541761 | 103 | 0.602554 | 16,206 | 0.920377 | 0 | 0 | 8,374 | 0.475579 | 0 | 0 | 4,157 | 0.236086 |
3007e107fbb9661b8e7f7e4c1d4a01f5c735b272 | 21,175 | py | Python | python/cli/report_study.py | mediumroast/mr_sdk | 55c7a13c5cef73e677297026b41b7ec23855391f | [
"Apache-2.0"
] | 1 | 2021-10-06T02:46:48.000Z | 2021-10-06T02:46:48.000Z | python/cli/report_study.py | mediumroast/mr_sdk | 55c7a13c5cef73e677297026b41b7ec23855391f | [
"Apache-2.0"
] | 3 | 2021-10-16T03:34:07.000Z | 2022-02-23T05:10:12.000Z | python/cli/report_study.py | mediumroast/mr_sdk | 55c7a13c5cef73e677297026b41b7ec23855391f | [
"Apache-2.0"
] | null | null | null | #!/bin/env python3
import sys
import argparse
import configparser
import docx
from docx import Document
from docx.shared import Pt, Inches
from docx.enum.dml import MSO_THEME_COLOR_INDEX
from docx.enum.section import WD_ORIENT, WD_SECTION
from datetime import datetime
from mediumroast.api.high_level import Auth as au... | 39.653558 | 143 | 0.648501 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,903 | 0.278719 |
300d26a47173ec68c9cbc913d71ba1fd8d873df4 | 17,388 | py | Python | hubcheck/browser/browser.py | codedsk/hubcheck | 2ff506eb56ba00f035300862f8848e4168452a17 | [
"MIT"
] | 1 | 2016-02-13T13:42:23.000Z | 2016-02-13T13:42:23.000Z | hubcheck/browser/browser.py | codedsk/hubcheck | 2ff506eb56ba00f035300862f8848e4168452a17 | [
"MIT"
] | null | null | null | hubcheck/browser/browser.py | codedsk/hubcheck | 2ff506eb56ba00f035300862f8848e4168452a17 | [
"MIT"
] | null | null | null | import pprint
import logging
import datetime
from selenium import webdriver
import hubcheck.conf
# block websites that make linkcheck slow
# these are usually blocked by the workspace firewall
# mozillalabs comes from using a nightly version of firefox browser
# many of the others are from login authentication site... | 45.046632 | 93 | 0.41868 | 5,816 | 0.334484 | 0 | 0 | 0 | 0 | 0 | 0 | 9,730 | 0.559581 |
300da26c3c232a2570a4579306f4ee78357682ca | 4,278 | py | Python | python/caty/jsontools/selector/parser.py | hidaruma/caty | f71d2ab0a001ea4f7a96a6e02211187ebbf54773 | [
"MIT"
] | null | null | null | python/caty/jsontools/selector/parser.py | hidaruma/caty | f71d2ab0a001ea4f7a96a6e02211187ebbf54773 | [
"MIT"
] | null | null | null | python/caty/jsontools/selector/parser.py | hidaruma/caty | f71d2ab0a001ea4f7a96a6e02211187ebbf54773 | [
"MIT"
] | null | null | null |
from topdown import *
from caty.jsontools import stdjson
from caty.jsontools import xjson
from caty.jsontools.selector import stm as default_factory
from caty.core.spectypes import UNDEFINED
from caty.core.language import name_token
class JSONPathSelectorParser(Parser):
def __init__(self, empty_when_error=False, ... | 31.688889 | 115 | 0.542076 | 4,041 | 0.9446 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.056101 |
300f199f66802964a7132356800aed7b1a0be7f9 | 7,057 | py | Python | appengine/gae_defer_manager/deferred_manager/tests.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 6 | 2018-07-31T16:48:07.000Z | 2020-02-01T03:17:51.000Z | appengine/gae_defer_manager/deferred_manager/tests.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 41 | 2018-08-07T16:43:07.000Z | 2020-06-05T18:54:50.000Z | appengine/gae_defer_manager/deferred_manager/tests.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 1 | 2018-08-07T16:40:18.000Z | 2018-08-07T16:40:18.000Z | # -*- coding: utf8 -*-
import datetime
import mock
import os
import unittest
import webapp2
from google.appengine.ext import testbed, deferred
from google.appengine.api import queueinfo
from . import models
from .handler import application
from .wrapper import defer
TESTCONFIG_DIR = os.path.join(
os.path.dirnam... | 34.257282 | 102 | 0.69803 | 6,506 | 0.92166 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.081598 |
3010ae6e12181dbe483e73b05d5e55639ba72b1f | 240 | py | Python | backend/categories/models.py | cristianemoyano/django-react-webapp | c91d263f58b0d66a8c260e095d0ec6cee66f8afd | [
"MIT"
] | null | null | null | backend/categories/models.py | cristianemoyano/django-react-webapp | c91d263f58b0d66a8c260e095d0ec6cee66f8afd | [
"MIT"
] | null | null | null | backend/categories/models.py | cristianemoyano/django-react-webapp | c91d263f58b0d66a8c260e095d0ec6cee66f8afd | [
"MIT"
] | null | null | null | from django.db import models
class Category(models.Model):
"""Category model."""
name = models.CharField(max_length=100, unique=True)
class Meta:
ordering = ('name',)
def __str__(self):
return self.name
| 17.142857 | 56 | 0.633333 | 208 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.1125 |
30113171dc48ed74cadebf84f1f1fd11cb8f6566 | 4,023 | py | Python | BdBG.py | rongjiewang/BdBG | b4a8fab0fa083aecab10f15431e37b0445722007 | [
"MIT"
] | 2 | 2018-11-21T06:39:34.000Z | 2018-11-21T06:43:53.000Z | BdBG.py | rongjiewang/BdBG | b4a8fab0fa083aecab10f15431e37b0445722007 | [
"MIT"
] | null | null | null | BdBG.py | rongjiewang/BdBG | b4a8fab0fa083aecab10f15431e37b0445722007 | [
"MIT"
] | null | null | null | """MIT License
Copyright (c) 2018 rongjiewang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, di... | 36.243243 | 126 | 0.653492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,773 | 0.440716 |
30119e15a78b5e7aea8cf1c27d45b2140994ce7e | 10,820 | py | Python | web/lib/console.py | jonathanverner/brython-jinja2 | cec6e16de1750203a858d0acf590f230fc3bf848 | [
"BSD-3-Clause"
] | 2 | 2020-09-13T17:51:55.000Z | 2020-11-25T18:47:12.000Z | web/lib/console.py | jonathanverner/brython-jinja2 | cec6e16de1750203a858d0acf590f230fc3bf848 | [
"BSD-3-Clause"
] | 2 | 2020-11-25T19:18:15.000Z | 2021-06-01T21:48:12.000Z | web/lib/console.py | jonathanverner/brython-jinja2 | cec6e16de1750203a858d0acf590f230fc3bf848 | [
"BSD-3-Clause"
] | null | null | null | """
This module provides the interactive Python console.
"""
import sys
import traceback
from browser import window
class Console:
"""
A class providing a console widget. The constructor accepts
a domnode which should be a textarea and it takes it over
and turns it into a python inter... | 39.926199 | 139 | 0.539464 | 10,695 | 0.988447 | 0 | 0 | 0 | 0 | 0 | 0 | 3,490 | 0.322551 |
30124f8335d73ee7802841f7737a00cbfad26c9f | 1,333 | py | Python | lldb/test/API/functionalities/breakpoint/breakpoint_on_overload/TestBreakOnOverload.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | null | null | null | lldb/test/API/functionalities/breakpoint/breakpoint_on_overload/TestBreakOnOverload.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | null | null | null | lldb/test/API/functionalities/breakpoint/breakpoint_on_overload/TestBreakOnOverload.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | null | null | null | """
Test setting a breakpoint on an overloaded function by name.
"""
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestBreakpointOnOverload(TestBase):
mydir = TestBase.compute_mydir(__file__)
def check_breakpoin... | 35.078947 | 72 | 0.685671 | 1,097 | 0.822956 | 0 | 0 | 0 | 0 | 0 | 0 | 478 | 0.35859 |
30142c5188e376313f7d79178393a7007c7faa25 | 2,611 | py | Python | Intermedio/28 Pomodoro/main.py | YosafatM/100-days-of-Python | e81ab663b7aacb7a904f27a4e6774837cf3594a1 | [
"MIT"
] | null | null | null | Intermedio/28 Pomodoro/main.py | YosafatM/100-days-of-Python | e81ab663b7aacb7a904f27a4e6774837cf3594a1 | [
"MIT"
] | null | null | null | Intermedio/28 Pomodoro/main.py | YosafatM/100-days-of-Python | e81ab663b7aacb7a904f27a4e6774837cf3594a1 | [
"MIT"
] | null | null | null | from tkinter import *
# ---------------------------- CONSTANTS ------------------------------- #
PINK = "#e2979c"
RED = "#e7305b"
GREEN = "#9bdeac"
YELLOW = "#f7f5dd"
FONT_NAME = "Courier"
WORK_MIN = 25
SHORT_BREAK_MIN = 5
LONG_BREAK_MIN = 20
is_counting = False
reps = 0
timer = None
# ---------------------------- ... | 27.484211 | 99 | 0.573727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 599 | 0.229238 |
301761f399153aa6d426b47322db15a73620a802 | 1,983 | py | Python | ImageAnalyses/tests_maps.py | nicholst/narps | 0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc | [
"MIT"
] | 30 | 2019-07-17T22:27:02.000Z | 2021-12-21T11:38:12.000Z | ImageAnalyses/tests_maps.py | nicholst/narps | 0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc | [
"MIT"
] | 21 | 2019-07-18T14:26:14.000Z | 2020-01-20T17:59:19.000Z | ImageAnalyses/tests_maps.py | nicholst/narps | 0a9d71a5ab435b40dcd50fea82d2961a43f0a3fc | [
"MIT"
] | 12 | 2019-07-20T06:14:21.000Z | 2021-09-25T00:35:29.000Z | # tests for narps code
# - currently these are all just smoke tests
import pytest
import os
import pandas
from narps import Narps
from AnalyzeMaps import mk_overlap_maps,\
mk_range_maps, mk_std_maps,\
mk_correlation_maps_unthresh, analyze_clusters,\
plot_distance_from_mean, get_thresh_similarity
from MetaA... | 24.182927 | 70 | 0.753404 | 0 | 0 | 0 | 0 | 282 | 0.142209 | 0 | 0 | 423 | 0.213313 |
3017c55b6cc7146b6404407438f7cdac4217ef3c | 2,529 | py | Python | dtcwt/plotting.py | santosh653/dtcwt | 01d9e87dc9abfa244a89c1f05aebf3dec6999f3a | [
"BSD-2-Clause"
] | 61 | 2015-01-04T09:21:29.000Z | 2022-03-07T16:25:02.000Z | dtcwt/plotting.py | santosh653/dtcwt | 01d9e87dc9abfa244a89c1f05aebf3dec6999f3a | [
"BSD-2-Clause"
] | 17 | 2015-04-02T13:37:07.000Z | 2018-03-07T09:57:57.000Z | dtcwt/plotting.py | santosh653/dtcwt | 01d9e87dc9abfa244a89c1f05aebf3dec6999f3a | [
"BSD-2-Clause"
] | 26 | 2015-04-16T06:22:16.000Z | 2021-12-07T09:17:44.000Z | """
Convenience functions for plotting DTCWT-related objects.
"""
from __future__ import absolute_import
import numpy as np
from matplotlib.pyplot import *
__all__ = (
'overlay_quiver',
)
def overlay_quiver(image, vectorField, level, offset):
"""Overlays nicely coloured quiver plot of complex coefficients ... | 34.643836 | 145 | 0.670621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,446 | 0.571767 |
30183648f14231172bd2966dd1817ea75267e595 | 428 | py | Python | src/grokcore/registries/tests/registries/global.py | zopefoundation/grokcore.registries | 90c5221867e07c0194df36f13fa4dda5f3a4923c | [
"ZPL-2.1"
] | null | null | null | src/grokcore/registries/tests/registries/global.py | zopefoundation/grokcore.registries | 90c5221867e07c0194df36f13fa4dda5f3a4923c | [
"ZPL-2.1"
] | null | null | null | src/grokcore/registries/tests/registries/global.py | zopefoundation/grokcore.registries | 90c5221867e07c0194df36f13fa4dda5f3a4923c | [
"ZPL-2.1"
] | null | null | null | import grokcore.component as grok
from grokcore.component.interfaces import IContext
import grokcore.view as view
from zope.interface import Interface
from grokcore.registries.tests.registries.interfaces import IExample
class MyExample(grok.GlobalUtility):
grok.name('global')
grok.implements(IExample)
class... | 23.777778 | 68 | 0.773364 | 202 | 0.471963 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.074766 |
301a3402ce430cb702ae2f205a2ed74937b55dc4 | 2,481 | py | Python | graphdata/loglog.py | whalenpt/graphdata | d169150f860551d2049342ecf310dc1783987266 | [
"MIT"
] | null | null | null | graphdata/loglog.py | whalenpt/graphdata | d169150f860551d2049342ecf310dc1783987266 | [
"MIT"
] | null | null | null | graphdata/loglog.py | whalenpt/graphdata | d169150f860551d2049342ecf310dc1783987266 | [
"MIT"
] | null | null | null |
from graphdata.shared.shared1D import AuxPlotLabelLL1D
from graphdata.shared.shared1D import ProcessData1D
from graphdata.shared.shared1D import LoadData1D
from graphdata.shared.figsizes import LogLogSize
from graphdata.shared.shared import ExtendDictionary
from graphdata.shared.shared import ProcessComplex
from gr... | 29.535714 | 96 | 0.646514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 970 | 0.390971 |
301d726bb49a99005fdbccd8050406dd9847256c | 5,387 | py | Python | integration-testing/tests/suites/test_premium_account.py | pwei1018/bcrs-testing | 318845dede6ce5994b74b976d01f36a503036551 | [
"Apache-2.0"
] | 2 | 2020-10-23T22:08:34.000Z | 2021-10-19T19:37:21.000Z | integration-testing/tests/suites/test_premium_account.py | pwei1018/bcrs-testing | 318845dede6ce5994b74b976d01f36a503036551 | [
"Apache-2.0"
] | 6 | 2020-09-29T23:05:34.000Z | 2022-01-29T20:59:08.000Z | integration-testing/tests/suites/test_premium_account.py | pwei1018/bcrs-testing | 318845dede6ce5994b74b976d01f36a503036551 | [
"Apache-2.0"
] | 10 | 2020-09-29T23:05:46.000Z | 2021-11-29T23:07:10.000Z | import datetime
import json
import requests
import pytest
import random
from tests.suites.test_payment import TestPayment
from tests.utilities.settings import get_settings, get_test_data, setup_access_data
@pytest.mark.incremental
@pytest.mark.parametrize('login_session', setup_access_data('PREMIUM', ['BCSC']), indi... | 51.304762 | 138 | 0.634305 | 5,001 | 0.928346 | 0 | 0 | 5,177 | 0.961017 | 0 | 0 | 1,783 | 0.330982 |
302088ce171e1ce5fee7f69b6466cc5d52936180 | 3,960 | py | Python | dingtalk/python/alibabacloud_dingtalk/workrecord_1_0/client.py | yndu13/dingtalk-sdk | 700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f | [
"Apache-2.0"
] | 15 | 2020-08-27T04:10:26.000Z | 2022-03-07T06:25:42.000Z | dingtalk/python/alibabacloud_dingtalk/workrecord_1_0/client.py | yndu13/dingtalk-sdk | 700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f | [
"Apache-2.0"
] | 1 | 2020-09-27T01:30:46.000Z | 2021-12-29T09:15:34.000Z | dingtalk/python/alibabacloud_dingtalk/workrecord_1_0/client.py | yndu13/dingtalk-sdk | 700fb7bb49c4d3167f84afc5fcb5e7aa5a09735f | [
"Apache-2.0"
] | 5 | 2020-08-27T04:07:44.000Z | 2021-12-03T02:55:20.000Z | # -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.
from Tea.core import TeaCore
from alibabacloud_tea_openapi.client import Client as OpenApiClient
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_tea_util.client import Client as UtilClient
from alibabacloud_d... | 44.494382 | 150 | 0.716162 | 3,436 | 0.867677 | 0 | 0 | 0 | 0 | 1,585 | 0.400253 | 348 | 0.087879 |
30220c4e2730501b7f29fa25506bdd0fdf76716c | 16,677 | py | Python | ehr_ml/clmbr/__init__.py | som-shahlab/ehr_ml | 4f83ac5b882916a175f0d242b38d914d00bf8a7c | [
"MIT"
] | 4 | 2021-03-12T21:41:37.000Z | 2021-06-25T16:49:52.000Z | ehr_ml/clmbr/__init__.py | som-shahlab/ehr_ml | 4f83ac5b882916a175f0d242b38d914d00bf8a7c | [
"MIT"
] | 22 | 2020-11-19T00:04:27.000Z | 2022-03-02T18:16:08.000Z | ehr_ml/clmbr/__init__.py | som-shahlab/ehr_ml | 4f83ac5b882916a175f0d242b38d914d00bf8a7c | [
"MIT"
] | 2 | 2021-05-12T13:11:46.000Z | 2021-10-15T18:30:14.000Z | from __future__ import annotations
import argparse
import pickle
import numpy as np
import json
import logging
import math
import glob
import random
import os
import sys
import datetime
import time
from functools import partial
from pathlib import Path
from collections import defaultdict
from shutil import copyfile
f... | 32.009597 | 128 | 0.59651 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,246 | 0.254602 |
30246a2f75b29a8ba062fda27b38c1e541c4ddd0 | 190 | py | Python | exercicios nivel 4/06-PA.py | Carlosxc-dev/LINGUAGEM_PYTHON | 5d512038d9c841dea96e4ccea18da76265318199 | [
"MIT"
] | 1 | 2021-11-25T00:29:07.000Z | 2021-11-25T00:29:07.000Z | exercicios nivel 4/06-PA.py | Carlosxc-dev/LINGUAGEM_PYTHON | 5d512038d9c841dea96e4ccea18da76265318199 | [
"MIT"
] | null | null | null | exercicios nivel 4/06-PA.py | Carlosxc-dev/LINGUAGEM_PYTHON | 5d512038d9c841dea96e4ccea18da76265318199 | [
"MIT"
] | null | null | null | prim = int(input('primeiro termo: '))
raz = int(input('razao: '))
dec = prim + (10 - 1) * raz
for c in range(prim, dec + raz, raz):
print(' {}'.format(c,), end=' ->')
print('acabou')
| 19 | 38 | 0.547368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.236842 |
302482d09ddf1f774c52862c7051a379cb2cfac1 | 8,215 | py | Python | scenarios.py | Sanghyun-Hong/DeepSloth | 92b3d0d3ef3f974d8bce7b4b4a1828776227e3c6 | [
"MIT"
] | 9 | 2020-12-16T04:55:57.000Z | 2022-01-13T08:28:11.000Z | scenarios.py | Sanghyun-Hong/DeepSloth | 92b3d0d3ef3f974d8bce7b4b4a1828776227e3c6 | [
"MIT"
] | null | null | null | scenarios.py | Sanghyun-Hong/DeepSloth | 92b3d0d3ef3f974d8bce7b4b4a1828776227e3c6 | [
"MIT"
] | 1 | 2021-10-11T06:21:04.000Z | 2021-10-11T06:21:04.000Z | """
A script that partitions the dataset for transferability scenarios
"""
# basics
import numpy as np
from PIL import Image
# torch...
import torch
# custom libs
import utils
# ------------------------------------------------------------------------------
# Misc. functions
# ---------------------------------... | 45.893855 | 216 | 0.667925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,572 | 0.313086 |
3024da0c8cff966a108eb9eabba60d6ffdc885bc | 2,878 | py | Python | Gmail.py | renauddahou/appointment_bot | f78c4242c6d0eb1dfc2edfdca8c4f37b22d9cf93 | [
"MIT"
] | 3 | 2021-05-12T22:27:08.000Z | 2022-03-24T14:50:20.000Z | Gmail.py | renauddahou/appointment_bot | f78c4242c6d0eb1dfc2edfdca8c4f37b22d9cf93 | [
"MIT"
] | 3 | 2021-12-26T12:38:57.000Z | 2022-03-25T19:34:31.000Z | Gmail.py | renauddahou/appointment_bot | f78c4242c6d0eb1dfc2edfdca8c4f37b22d9cf93 | [
"MIT"
] | 4 | 2021-07-30T16:41:30.000Z | 2022-02-01T14:48:45.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 10 17:49:07 2020
@author: Amir
"""
import email
import imaplib
from email.header import decode_header
import re
def gmail_ckeck(email_address, password):
mail = imaplib.IMAP4_SSL('imap.gmail.com')
(retcode, capabilities) = mail.login(email_addres... | 35.530864 | 105 | 0.407575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 380 | 0.132036 |
3026fa5fec5a07d66102ae71523732602b37bf87 | 6,637 | py | Python | Multi-agent Transfer RL/Transfer across tasks/Bayes-ToMoP/games.py | TJU-DRL-LAB/transfer-and-multi-task-reinforcement-learning | 2d8c12c2b5a4865c02934b63091945d3e2c92e90 | [
"MIT"
] | null | null | null | Multi-agent Transfer RL/Transfer across tasks/Bayes-ToMoP/games.py | TJU-DRL-LAB/transfer-and-multi-task-reinforcement-learning | 2d8c12c2b5a4865c02934b63091945d3e2c92e90 | [
"MIT"
] | null | null | null | Multi-agent Transfer RL/Transfer across tasks/Bayes-ToMoP/games.py | TJU-DRL-LAB/transfer-and-multi-task-reinforcement-learning | 2d8c12c2b5a4865c02934b63091945d3e2c92e90 | [
"MIT"
] | null | null | null | # coding=utf-8
import numpy as np
import imageio
from gym import spaces
import tkinter as tk
from PIL import Image, ImageTk
import matplotlib.pyplot as plt
import time
CELL, BLOCK, AGENT_GOAL, OPPONENT_GOAL, AGENT, OPPONENT = range(6)
WIN, LOSE = 5, -5
UP, RIGHT, DOWN, LEFT, HOLD = range(5)
UNIT = 40
class Soccer... | 39.041176 | 178 | 0.552509 | 5,852 | 0.881724 | 0 | 0 | 0 | 0 | 0 | 0 | 516 | 0.077746 |
302802899cbe877d306af7d92c456a506768688c | 103 | py | Python | utils/__init__.py | riven314/AL-MDN | 5f843e2e7c99f3ae36e8139ec0d8aaa4a78d4962 | [
"BSD-Source-Code"
] | 59 | 2021-10-13T22:59:19.000Z | 2022-03-26T20:44:47.000Z | utils/__init__.py | jwchoi384/AL-MDN | 54aaae4405c69b33998e5b5306c7c645780d473c | [
"BSD-Source-Code"
] | 10 | 2021-11-02T06:35:24.000Z | 2022-03-26T21:08:06.000Z | utils/__init__.py | jwchoi384/AL-MDN | 54aaae4405c69b33998e5b5306c7c645780d473c | [
"BSD-Source-Code"
] | 9 | 2021-10-14T09:48:05.000Z | 2022-03-27T06:04:32.000Z | # Originated from https://github.com/amdegroot/ssd.pytorch
from .augmentations import SSDAugmentation
| 25.75 | 58 | 0.825243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.563107 |
30292b7c2f6979a04692b3c67d475af07d5a822b | 184 | py | Python | modules/moderation/__init__.py | H3xadecimal/Nest | 4422cf5725a71603ff58ccbf9f261b28ff96f70e | [
"MIT"
] | 10 | 2018-04-21T07:29:42.000Z | 2019-02-01T20:46:48.000Z | modules/moderation/__init__.py | H3xadecimal/Nest | 4422cf5725a71603ff58ccbf9f261b28ff96f70e | [
"MIT"
] | 2 | 2018-09-10T00:58:40.000Z | 2019-12-22T11:19:58.000Z | modules/moderation/__init__.py | H3xadecimal/Nest | 4422cf5725a71603ff58ccbf9f261b28ff96f70e | [
"MIT"
] | 2 | 2018-09-09T23:07:56.000Z | 2019-10-19T15:26:56.000Z | """
Basic moderation utilities for Birb.
"""
from .staff import CheckMods
from .actions import ModActions
def setup(bot):
bot.add_cog(CheckMods())
bot.add_cog(ModActions())
| 15.333333 | 36 | 0.717391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.23913 |
302af14bd5d8ff0171af453caa11c3079af12cfe | 227 | py | Python | docker_compose/tweet_collector/config.py | lenaromanenko/twitter_sentiment_analysis | ac642ee4a6c2af01bd413326ff0bae406c2e2efe | [
"MIT"
] | 1 | 2021-03-23T10:27:06.000Z | 2021-03-23T10:27:06.000Z | docker_compose/tweet_collector/config.py | lenaromanenko/twitter_sentiment_analysis | ac642ee4a6c2af01bd413326ff0bae406c2e2efe | [
"MIT"
] | null | null | null | docker_compose/tweet_collector/config.py | lenaromanenko/twitter_sentiment_analysis | ac642ee4a6c2af01bd413326ff0bae406c2e2efe | [
"MIT"
] | 1 | 2021-05-31T15:39:30.000Z | 2021-05-31T15:39:30.000Z | import os
API_KEY = os.getenv('API_KEY')
API_SECRET = os.getenv('API_SECRET')
ACCESS_TOKEN = os.getenv('ACCESS_TOKEN')
ACCESS_TOKEN_SECRET = os.getenv('ACCESS_TOKEN_SECRET')
POSTGRES_PASSWORD = os.getenv('POSTGRES_PASSWORD')
| 25.222222 | 54 | 0.784141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.330396 |
302cdd3bbef43498903450f4d3f2b0902dce4b22 | 605 | py | Python | opm/presentation/presentation.py | Open-Prose-Metrics/open_prose_metrics_app-core | 9df65edfe9ee9af0a0731c3f2e21ea25bced250c | [
"MIT"
] | null | null | null | opm/presentation/presentation.py | Open-Prose-Metrics/open_prose_metrics_app-core | 9df65edfe9ee9af0a0731c3f2e21ea25bced250c | [
"MIT"
] | 4 | 2021-04-30T21:38:10.000Z | 2022-01-13T03:32:33.000Z | opm/presentation/presentation.py | Open-Prose-Metrics/open_prose_metrics_app-core | 9df65edfe9ee9af0a0731c3f2e21ea25bced250c | [
"MIT"
] | 1 | 2021-03-21T14:08:28.000Z | 2021-03-21T14:08:28.000Z | class FrontEnd(object):
def __init__(self):
self.theme = "slate"
self.logo = "" # path from static/
self.app_name = "Open Prose Metrics"
self.report_title = "Results"
self.theme_cdn = self.bootswatch_url(self.theme)
def bootswatch_url(self, label):
if labe... | 37.8125 | 98 | 0.596694 | 601 | 0.993388 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.380165 |
302e0d78b3644fab203f5a2140185b921dd4135b | 7,140 | py | Python | tests/test_jid.py | nicfit/vexmpp | e67070d2822da8356345976fb15d365935b550a6 | [
"MIT"
] | null | null | null | tests/test_jid.py | nicfit/vexmpp | e67070d2822da8356345976fb15d365935b550a6 | [
"MIT"
] | 349 | 2017-02-18T22:48:17.000Z | 2021-12-13T19:50:23.000Z | tests/test_jid.py | nicfit/vexmpp | e67070d2822da8356345976fb15d365935b550a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_jid
----------------------------------
Tests for `vexmpp.xmpp.jid` module.
"""
import unittest
from vexmpp.jid import Jid, _parse, _prep, InvalidJidError, internJid
class TestJidParsing(unittest.TestCase):
def setUp(self):
pass
def test_basic(self):
self.as... | 29.874477 | 77 | 0.539076 | 6,934 | 0.971148 | 0 | 0 | 0 | 0 | 0 | 0 | 3,111 | 0.435714 |
302e8f1be7a7ffb783af9f6bd1bdc7f3405e6a18 | 745 | py | Python | brainutils/context.py | jimbuho/django-brain | 201237266a64e49b5c37f3d373ff6913dfbd099e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | brainutils/context.py | jimbuho/django-brain | 201237266a64e49b5c37f3d373ff6913dfbd099e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | brainutils/context.py | jimbuho/django-brain | 201237266a64e49b5c37f3d373ff6913dfbd099e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
.. module:: dbu - context
:platform: Unix, Windows
:synopsis: Contexto Principal por defecto
.. moduleauthor:: Diego Gonzalez <[email protected]>
"""
from . import configuration
from . import models
def load_context(request):
"""
Load Context
Description
... | 19.102564 | 58 | 0.640268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.487248 |
302ff0768eb4d4a5356d5db0b329d974eeccb455 | 689 | py | Python | tests/trainer/test_multi_trainer.py | michael-aloys/knodle | 393e7ba0558036828fb228875511977c40000ed5 | [
"Apache-2.0"
] | 71 | 2021-04-26T10:39:56.000Z | 2022-03-28T14:36:16.000Z | tests/trainer/test_multi_trainer.py | michael-aloys/knodle | 393e7ba0558036828fb228875511977c40000ed5 | [
"Apache-2.0"
] | 92 | 2021-04-08T12:49:38.000Z | 2022-02-03T14:24:05.000Z | tests/trainer/test_multi_trainer.py | michael-aloys/knodle | 393e7ba0558036828fb228875511977c40000ed5 | [
"Apache-2.0"
] | 10 | 2021-07-08T06:49:28.000Z | 2022-01-15T23:28:13.000Z | from tests.trainer.generic import std_trainer_input_1
from knodle.trainer.multi_trainer import MultiTrainer
def test_auto_train(std_trainer_input_1):
(
model,
model_input_x, rule_matches_z, mapping_rules_labels_t,
y_labels
) = std_trainer_input_1
trainers = ["majority", "snorkel"... | 25.518519 | 62 | 0.69521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.110305 |
3030b091442a66a1758237c47ca2d3b1d6082b1e | 368 | py | Python | core/models.py | dilshodbekikromov/weatherapp | 105ca8c7a142a4afdff9bff7c758896f0335610c | [
"PostgreSQL"
] | 1 | 2021-12-17T05:17:22.000Z | 2021-12-17T05:17:22.000Z | core/models.py | GiovannaK/Weather-app-django | 3138f03b34baa5866ed63f52dc4b759be6eb7aa4 | [
"MIT"
] | null | null | null | core/models.py | GiovannaK/Weather-app-django | 3138f03b34baa5866ed63f52dc4b759be6eb7aa4 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
class City(models.Model):
user = models.ManyToManyField(User, default=None,)
name = models.CharField(max_length=255, verbose_name="Nome da cidade")
def __str__(self):
return self.name
class Meta:
verbose_name = "... | 26.285714 | 74 | 0.701087 | 293 | 0.796196 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.089674 |
30325bbf9ed4d06063912ef3759ddd07cefbb4f5 | 133 | py | Python | python/numba_chol.py | sevagh/cholesky | bf5404bdaab497409c517312d5a234c6a5ffe9cf | [
"BSD-3-Clause"
] | null | null | null | python/numba_chol.py | sevagh/cholesky | bf5404bdaab497409c517312d5a234c6a5ffe9cf | [
"BSD-3-Clause"
] | null | null | null | python/numba_chol.py | sevagh/cholesky | bf5404bdaab497409c517312d5a234c6a5ffe9cf | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numba import jit
@jit
def cholesky(in_arr, out_arr, n):
np.copyto(out_arr, np.linalg.cholesky(in_arr))
| 16.625 | 50 | 0.736842 | 0 | 0 | 0 | 0 | 89 | 0.669173 | 0 | 0 | 0 | 0 |
30332c35e591fa52e355d5d29a0ebf609792b6f8 | 191 | py | Python | doxieapi/__init__.py | Stealthii/doxieapi | bf6803a579b9a9f768e3e602e3cb2fb1eb0e8f3c | [
"0BSD"
] | null | null | null | doxieapi/__init__.py | Stealthii/doxieapi | bf6803a579b9a9f768e3e602e3cb2fb1eb0e8f3c | [
"0BSD"
] | null | null | null | doxieapi/__init__.py | Stealthii/doxieapi | bf6803a579b9a9f768e3e602e3cb2fb1eb0e8f3c | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
doxieapi
~~~~~~~~
A Python library for the developer API of the Doxie Go Wi-Fi document scanner.
"""
from .api import DoxieScanner
__all__ = ['DoxieScanner']
| 13.642857 | 78 | 0.65445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.743455 |
3033df96925128ff7539e6a8f86e4620e486d85d | 18,447 | py | Python | iogt_content_migration/management/commands/load_v1_db.py | Albert-Jokelin/iogt | 79b1b86c11df7d61ddbbd4ce16303dfe4a1b8465 | [
"BSD-2-Clause"
] | null | null | null | iogt_content_migration/management/commands/load_v1_db.py | Albert-Jokelin/iogt | 79b1b86c11df7d61ddbbd4ce16303dfe4a1b8465 | [
"BSD-2-Clause"
] | null | null | null | iogt_content_migration/management/commands/load_v1_db.py | Albert-Jokelin/iogt | 79b1b86c11df7d61ddbbd4ce16303dfe4a1b8465 | [
"BSD-2-Clause"
] | null | null | null | from pathlib import Path
from django.core.management.base import BaseCommand
from wagtail.core.models import Page, Site, Locale
from django.core.files.images import ImageFile
from wagtail.images.models import Image
from wagtail_localize.models import Translation
from wagtail_localize.views.submit_translations import Tr... | 40.277293 | 152 | 0.58725 | 18,027 | 0.977232 | 0 | 0 | 0 | 0 | 0 | 0 | 3,917 | 0.212338 |
3033fd8167635b4a38bf68dbe82419686667a557 | 2,968 | py | Python | run_files/cip_area_threshold/tissue_data/run_CIP_relaxation_times.py | jessiesrr/VTdyn | 6f71ef94525d95221f5bd5e5290f4df10648cd18 | [
"MIT"
] | null | null | null | run_files/cip_area_threshold/tissue_data/run_CIP_relaxation_times.py | jessiesrr/VTdyn | 6f71ef94525d95221f5bd5e5290f4df10648cd18 | [
"MIT"
] | null | null | null | run_files/cip_area_threshold/tissue_data/run_CIP_relaxation_times.py | jessiesrr/VTdyn | 6f71ef94525d95221f5bd5e5290f4df10648cd18 | [
"MIT"
] | null | null | null | import numpy as np
import libs.contact_inhibition_lib as lib #library for simulation routines
import libs.data as data
import libs.plot as vplt #plotting library
from structure.global_constants import *
import structure.initialisation as init
from structure.cell import Tissue, BasicSpringForceNoGrowth
import matplotlib... | 44.298507 | 143 | 0.738544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 323 | 0.108827 |
30350c07d409b3ddee9b9e26e89145475e5ec90e | 120 | py | Python | tmp/admin.py | infiltratorXYZ/invoicer | 9b3542040b0e8268b2f725eeee8b806f9ca61a6d | [
"MIT"
] | null | null | null | tmp/admin.py | infiltratorXYZ/invoicer | 9b3542040b0e8268b2f725eeee8b806f9ca61a6d | [
"MIT"
] | null | null | null | tmp/admin.py | infiltratorXYZ/invoicer | 9b3542040b0e8268b2f725eeee8b806f9ca61a6d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Invoice
# Register your models here.
admin.site.register(Invoice)
| 20 | 32 | 0.808333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.233333 |
3035188b0c9611cb3581b6c9c987990a72ba1ab9 | 17,920 | py | Python | TAPI_RI/flask_server/tapi_server/models/connection_end_point.py | bartoszm/Snowmass-ONFOpenTransport | 874e7a3f311d915d692b27fcbd24032c89064f00 | [
"Apache-2.0"
] | null | null | null | TAPI_RI/flask_server/tapi_server/models/connection_end_point.py | bartoszm/Snowmass-ONFOpenTransport | 874e7a3f311d915d692b27fcbd24032c89064f00 | [
"Apache-2.0"
] | null | null | null | TAPI_RI/flask_server/tapi_server/models/connection_end_point.py | bartoszm/Snowmass-ONFOpenTransport | 874e7a3f311d915d692b27fcbd24032c89064f00 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from tapi_server.models.base_model_ import Model
from tapi_server.models.name_and_value import NameAndValue # noqa: F401,E501
from tapi_server.models.operational_state... | 43.814181 | 536 | 0.69135 | 17,359 | 0.968694 | 0 | 0 | 12,973 | 0.72394 | 0 | 0 | 11,047 | 0.616462 |
30357aaf0a514c1636520e15938cba9dc811ec7d | 901 | py | Python | idom_jupyter/jupyter_server_extension.py | idom-team/idom-jupyter | 21037d41c51d4d9e23cca4486a850f2915f27d29 | [
"MIT"
] | 28 | 2020-09-12T19:59:27.000Z | 2022-03-14T10:08:13.000Z | idom_jupyter/jupyter_server_extension.py | idom-team/idom-jupyter | 21037d41c51d4d9e23cca4486a850f2915f27d29 | [
"MIT"
] | 11 | 2020-10-05T06:54:43.000Z | 2022-02-19T21:16:31.000Z | idom_jupyter/jupyter_server_extension.py | idom-team/idom-jupyter | 21037d41c51d4d9e23cca4486a850f2915f27d29 | [
"MIT"
] | null | null | null | from urllib.parse import urljoin
from appdirs import user_data_dir
from notebook.notebookapp import NotebookApp
from idom.config import IDOM_WED_MODULES_DIR
from tornado.web import StaticFileHandler
from tornado.web import Application
IDOM_WED_MODULES_DIR.current = user_data_dir("idom-jupyter", "idom-team")
def _l... | 29.064516 | 73 | 0.712542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.122087 |
303647975ecbe068790f55c360ba681d772f2c4f | 1,033 | py | Python | dobot_gym/envs/real/dobot_env.py | sandipan1/dobot_gym | acea98da2506653d45d55e15a036da583415f31d | [
"MIT"
] | 1 | 2020-11-22T11:07:01.000Z | 2020-11-22T11:07:01.000Z | dobot_gym/envs/real/dobot_env.py | sandipan1/dobot_gym | acea98da2506653d45d55e15a036da583415f31d | [
"MIT"
] | null | null | null | dobot_gym/envs/real/dobot_env.py | sandipan1/dobot_gym | acea98da2506653d45d55e15a036da583415f31d | [
"MIT"
] | 1 | 2021-01-10T09:36:25.000Z | 2021-01-10T09:36:25.000Z | ## common class for only dobot with cam
import gym
from gym import utils
from glob import glob
from dobot_gym.utils.dobot_controller import DobotController
from gym.spaces import MultiDiscrete
class DobotRealEnv(gym.Env, utils.EzPickle):
def __init__(self):
super().__init__()
# Find the port on ... | 28.694444 | 60 | 0.648596 | 836 | 0.809293 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.126815 |
3037ce4b050caa1080564ccd27af84ba3f81c62a | 1,609 | py | Python | Calibration/LumiAlCaRecoProducers/test/crab3_raw_corrC.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Calibration/LumiAlCaRecoProducers/test/crab3_raw_corrC.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Calibration/LumiAlCaRecoProducers/test/crab3_raw_corrC.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #########################
#Author: Sam Higginbotham
########################
from WMCore.Configuration import Configuration
config = Configuration()
#name='Pt11to30'
config.section_("General")
config.General.requestName = 'PCC_Run2017E_Corrections'
config.General.workArea = 'RawPCCZeroBias2017'
config.section_("JobT... | 36.568182 | 163 | 0.778745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 931 | 0.57862 |
3037ecccd158f87250f163febc7c04a882e857b4 | 6,819 | py | Python | active_frame.py | binhhoangtieu/C3D-tensorflow | d85ef6156abc7fcdb4ab91e5b47a50c5ef5123c6 | [
"MIT"
] | 1 | 2019-02-11T15:47:52.000Z | 2019-02-11T15:47:52.000Z | active_frame.py | binhhoangtieu/C3D-tensorflow | d85ef6156abc7fcdb4ab91e5b47a50c5ef5123c6 | [
"MIT"
] | null | null | null | active_frame.py | binhhoangtieu/C3D-tensorflow | d85ef6156abc7fcdb4ab91e5b47a50c5ef5123c6 | [
"MIT"
] | 1 | 2018-12-04T04:55:19.000Z | 2018-12-04T04:55:19.000Z | import cv2
import os
import glob
import numpy as np
from operator import itemgetter
# import matplotlib.pyplot as plt
import math
import scipy.stats as stats
def main():
video_dir = './UCF-101' #./testdata
result_dir = './UCF101-OF' #test-image
loaddata(video_dir = video_dir, depth = 24, dest_forder=result_dir)
de... | 31.569444 | 110 | 0.706555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,043 | 0.152955 |
303842a63bcf998cc97937b86976891ee5b81ac2 | 5,547 | py | Python | lift-learn/metrics/_values.py | smn-ailab/lift-learn | 158b8be554aad49033ee2eacf14fbbeb2418d6f7 | [
"MIT"
] | 1 | 2019-03-12T11:07:16.000Z | 2019-03-12T11:07:16.000Z | lift-learn/metrics/_values.py | smn-ailab/lift-learn | 158b8be554aad49033ee2eacf14fbbeb2418d6f7 | [
"MIT"
] | 1 | 2019-02-15T06:21:33.000Z | 2019-02-20T01:03:54.000Z | lift-learn/metrics/_values.py | smn-ailab/lift-learn | 158b8be554aad49033ee2eacf14fbbeb2418d6f7 | [
"MIT"
] | null | null | null | """Metrics to assess performance on ite prediction task."""
from typing import Optional
import numpy as np
import pandas as pd
def expected_response(y: np.ndarray, w: np.ndarray, policy: np.ndarray,
mu: Optional[np.ndarray]=None, ps: Optional[np.ndarray]=None) -> float:
"""Estimate expected... | 36.493421 | 152 | 0.650442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,664 | 0.48026 |
30393f74ae0c5c36f82aebb7e0b95f7f112a1231 | 1,133 | py | Python | data_parser.py | JanoHorvath/k-means-clustering | c84e858c3e2bb417ffea11d441797a15c659a7ee | [
"MIT"
] | null | null | null | data_parser.py | JanoHorvath/k-means-clustering | c84e858c3e2bb417ffea11d441797a15c659a7ee | [
"MIT"
] | null | null | null | data_parser.py | JanoHorvath/k-means-clustering | c84e858c3e2bb417ffea11d441797a15c659a7ee | [
"MIT"
] | null | null | null | from random import randint
class Dataset:
def get_mock_scattered_dataset(self, numberOf, x_upper_bound, y_upper_bound):
""" Mock 2D dataset with scattered data points. """
points = []
for i in range(numberOf):
point = [randint(0,x_upper_bound), randint(0,y_upper_bound), 'blac... | 33.323529 | 119 | 0.614298 | 1,104 | 0.974404 | 0 | 0 | 0 | 0 | 0 | 0 | 295 | 0.260371 |
303a0f7118c7766ed025bf5dc2723fe60db8bf3e | 623 | py | Python | backend/colleges/utils.py | cesko-digital/zacni-uc | 281c56aec5509d5dd8bbbd60f054ffcd9156609e | [
"MIT"
] | 4 | 2021-02-26T09:28:14.000Z | 2021-07-08T19:21:57.000Z | backend/colleges/utils.py | cesko-digital/zacni-uc | 281c56aec5509d5dd8bbbd60f054ffcd9156609e | [
"MIT"
] | 35 | 2021-01-27T08:38:59.000Z | 2021-12-13T19:42:38.000Z | backend/colleges/utils.py | cesko-digital/zacni-uc | 281c56aec5509d5dd8bbbd60f054ffcd9156609e | [
"MIT"
] | 5 | 2021-01-21T21:35:42.000Z | 2022-01-06T10:07:58.000Z | from openpyxl import load_workbook
def import_msmt_college_registry_xlsx(path, sheet_name):
"""
Import XLSX from https://regvssp.msmt.cz/registrvssp/cvslist.aspx
(list of colleges and faculties).
Parameters:
path -- path to XLSX file
sheet_name -- "ExportVS" or "ExportFakulty"
"""... | 25.958333 | 69 | 0.638844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.35634 |
303aea533163720c626b39e6c0bbce695a86963f | 16,358 | py | Python | tests/cases/matching_graph.py | nilsec/mtrack | 76652c468417c7e3ac9903586c0127b884d6b032 | [
"MIT"
] | null | null | null | tests/cases/matching_graph.py | nilsec/mtrack | 76652c468417c7e3ac9903586c0127b884d6b032 | [
"MIT"
] | null | null | null | tests/cases/matching_graph.py | nilsec/mtrack | 76652c468417c7e3ac9903586c0127b884d6b032 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from mtrack.graphs import G1
from mtrack.evaluation.matching_graph import MatchingGraph
from mtrack.evaluation.voxel_skeleton import VoxelSkeleton
from comatch import match_components
import json
test_data_dir = "./data"
class ParallelLinesSetUp(unittest.TestCase):
def setUp(se... | 38.399061 | 183 | 0.578127 | 16,026 | 0.979704 | 0 | 0 | 0 | 0 | 0 | 0 | 972 | 0.05942 |
303b9455bfc79c1d55b5b456a3c9a97a10ddaa26 | 5,706 | py | Python | act/qc/arm.py | jrobrien91/ACT | 604b93d75366d23029f89d88df9053d52825c214 | [
"BSD-3-Clause"
] | 9 | 2019-03-11T19:41:34.000Z | 2019-09-17T08:34:19.000Z | act/qc/arm.py | jrobrien91/ACT | 604b93d75366d23029f89d88df9053d52825c214 | [
"BSD-3-Clause"
] | 127 | 2019-03-18T12:24:17.000Z | 2020-01-06T20:53:06.000Z | act/qc/arm.py | jrobrien91/ACT | 604b93d75366d23029f89d88df9053d52825c214 | [
"BSD-3-Clause"
] | 15 | 2019-03-11T15:30:56.000Z | 2019-11-01T19:10:11.000Z | """
Functions specifically for working with QC/DQRs from
the Atmospheric Radiation Measurement Program (ARM).
"""
import datetime as dt
import numpy as np
import requests
from act.config import DEFAULT_DATASTREAM_NAME
def add_dqr_to_qc(
obj,
variable=None,
assessment='incorrect,suspect',
exclude=No... | 33.174419 | 91 | 0.608132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,073 | 0.538556 |
303cbb53a5783485cb968c141cc21be11daa907d | 1,458 | py | Python | tests/test_main_page.py | litovsky2/shop_test | a618f23debfb2efa6f1fceb7eff6443a10f0b11f | [
"Apache-2.0"
] | 1 | 2020-05-03T21:32:49.000Z | 2020-05-03T21:32:49.000Z | tests/test_main_page.py | litovsky2/shop_test | a618f23debfb2efa6f1fceb7eff6443a10f0b11f | [
"Apache-2.0"
] | 1 | 2020-07-01T11:12:02.000Z | 2020-07-01T11:12:02.000Z | tests/test_main_page.py | litovsky2/shop_test | a618f23debfb2efa6f1fceb7eff6443a10f0b11f | [
"Apache-2.0"
] | 2 | 2021-03-08T14:46:09.000Z | 2021-08-30T13:12:21.000Z | import allure
from common.constans import PrintedDress, PrintedSummerDress, Colors
@allure.step('Product Card')
def test_open_product_card(app, login):
"""
1. Open page
2. Choose product
3. Open product card
4. Check product info
"""
app.page.select_woman_catego... | 37.384615 | 76 | 0.688615 | 0 | 0 | 0 | 0 | 1,361 | 0.933471 | 0 | 0 | 309 | 0.211934 |