repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
austintwang/sc_scripts | 13,091,060,350,034 | c56a45d51e23da91777d3655de72ea9caf339c72 | 203ef5dfaaa727c7e247d8cc86c59caf203c436b | /make_star_vcf.py | 444b0b044410f727af8c5ceffc272abdbb8beb53 | [] | no_license | https://github.com/austintwang/sc_scripts | 981f11347d3d98b7263bb158ae73574f12e29820 | c570aea63e816eaa74c0bc50c5db7dc3b57d86d5 | refs/heads/master | 2021-06-27T06:17:07.623384 | 2021-06-11T19:00:46 | 2021-06-11T19:00:46 | 234,782,559 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import pysam
def make_star_vcf(in_path, out_path, min_af):
with open(in_path, "r") as in_file, open(out_path, "w") as out_file:
for line in in_file:
if line.startswith("##"):
continue
cols = line.strip().split()
if cols[0] == "#CHROM":
... | UTF-8 | Python | false | false | 1,123 | py | 58 | make_star_vcf.py | 58 | 0.505788 | 0.487088 | 0 | 28 | 39.107143 | 82 |
mecrowley/Other-Places-server | 17,033,840,305,921 | 641efab85ae6d757120a1b672822afe243160361 | 35d39ffca4095283e352a53e76d01fc7a65212f9 | /otherplacesapi/views/profile.py | f5ecc65274f90d234daa6195f21eada619e06554 | [] | no_license | https://github.com/mecrowley/Other-Places-server | d3633a4a6e4123795b136e62df823a3022af6de5 | a21199b3cc5fc6d841d92038c5f6637bd565a186 | refs/heads/main | 2023-08-02T10:26:37.192287 | 2021-09-23T14:40:59 | 2021-09-23T14:40:59 | 406,410,676 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """View module for handling requests about park areas"""
import uuid
import base64
from django.core.files.base import ContentFile
from rest_framework.viewsets import ViewSet
from rest_framework.response import Response
from rest_framework.decorators import action
from django.http import HttpResponseServerError
from res... | UTF-8 | Python | false | false | 5,119 | py | 28 | profile.py | 19 | 0.605978 | 0.598945 | 0 | 138 | 36.094203 | 88 |
hp310780/user-survey-api | 6,184,752,921,842 | ade0239637dfa4ee37a32a6f0982aade232fbbeb | f89a621de86ec3a3ca2f5784988357db9d112f85 | /tests/test_surveys.py | 54d939cc834485f40ffdf6e742cd40d1b51a998a | [
"MIT"
] | permissive | https://github.com/hp310780/user-survey-api | f4345e2dd910300a4903542af061bd03b9a34a62 | 392a94919fac792d88b7ec37521b2e4ce1a9eb08 | refs/heads/master | 2022-12-14T07:25:24.195046 | 2020-09-21T07:21:26 | 2020-09-21T07:21:26 | 295,807,974 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import mock
TEST_JSON = "tests/test_data/test_surveys.json"
@mock.patch("os.getenv", return_value=TEST_JSON)
def test_survey_get(mock_db,
client):
"""Tests that 1 survey linked to 1 question is returned
from the survey/ endpoint."""
id = 1
response = client.get("/surveys/{}".forma... | UTF-8 | Python | false | false | 466 | py | 17 | test_surveys.py | 12 | 0.572961 | 0.555794 | 0 | 19 | 23.526316 | 59 |
CreativeOthman/hipeac | 6,210,522,716,605 | 932c7634df45d3cc6886bb0543d2c33993db0e7c | 3fda3ff2e9334433554b6cf923506f428d9e9366 | /hipeac/site/admin/_legacy/internships.py | e28d61a4455ab781b623568117ae66101b5c7ae8 | [
"MIT"
] | permissive | https://github.com/CreativeOthman/hipeac | 12adb61099886a6719dfccfa5ce26fdec8951bf9 | 2ce98da17cac2c6a87ec88df1b7676db4c200607 | refs/heads/master | 2022-07-20T10:06:58.771811 | 2020-05-07T11:39:13 | 2020-05-07T11:44:51 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from hipeac.models._legacy.internships import InternshipCall, Internship, InternshipApplication
@admin.register(InternshipCall)
class InternshipCallAdmin(admin.ModelAdmin):
list_display = ("id", "start_date", "application_deadline", "is_frozen")
@admin.register(Internship)
clas... | UTF-8 | Python | false | false | 1,204 | py | 435 | internships.py | 275 | 0.657807 | 0.657807 | 0 | 39 | 29.871795 | 95 |
SometimesNoReply/GB_PythonBases_A | 4,501,125,750,929 | ae3304ae17453184d7a83f15f801694723abd791 | e66729b6ca2e21d773edb3a4abf60bc3288722fa | /Lesson_8/hw_8_7.py | ea6803e5d28469f152f32c52f35e0d15bc710d97 | [] | no_license | https://github.com/SometimesNoReply/GB_PythonBases_A | 4b23549ee84aac22b7bfaadc70814b925be93bd1 | a2bf282d3ce11cb0dce285553c550fe163342538 | refs/heads/master | 2020-12-19T07:29:05.106319 | 2020-02-24T19:41:20 | 2020-02-24T19:41:20 | 235,664,211 | 0 | 0 | null | false | 2020-02-24T19:41:22 | 2020-01-22T20:50:53 | 2020-02-24T19:41:00 | 2020-02-24T19:41:21 | 41 | 0 | 0 | 0 | Python | false | false | # Homework: Lesson 8. Task 7
"""
Реализовать проект «Операции с комплексными числами». Создайте класс «Комплексное
число», реализуйте перегрузку методов сложения и умножения комплексных чисел.
Проверьте работу проекта, создав экземпляры класса (комплексные числа) и выполнив
сложение и умнож... | UTF-8 | Python | false | false | 1,935 | py | 50 | hw_8_7.py | 45 | 0.577608 | 0.568702 | 0 | 52 | 29.230769 | 90 |
brugger/pipeliners | 15,753,940,064,302 | c100dc2197a15a58f38ca39a0854a29842bfb17b | 4e66ff87ab64398f3c5a53b94653d647ff528483 | /pipeliners/backend.py | 81c31ee318ab65963dcd2d19797c48d4d79a78cd | [
"MIT"
] | permissive | https://github.com/brugger/pipeliners | 167f48582ab7dbc1737b762e46f4482e4553f23f | 5d22c657bda5c0ecb1f0d2fbc76064f90e02dcfb | refs/heads/master | 2021-05-01T22:58:45.181641 | 2018-06-01T07:58:33 | 2018-06-01T07:58:33 | 120,926,579 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
class Backend(object):
def name(self):
""" returns name of the backend
Args:
None
Returns:
backend name (str)
"""
return "base backend class"
def submit(self, job):
""" submits/starts a job
Args:
Job (obj): job object
... | UTF-8 | Python | false | false | 1,252 | py | 24 | backend.py | 13 | 0.519169 | 0.519169 | 0 | 62 | 19.145161 | 68 |
cm107/common_utils | 429,496,748,991 | 4e348e968f7fb096c0140f2b3b3f9bae20bc4a46 | 2a1b9b1f6c0e581a67007eb93ea622aa343d7e01 | /test/spirograph_test.py | 307f672d158b48b9f06d771cc702d506a639062f | [
"MIT"
] | permissive | https://github.com/cm107/common_utils | 71fe08eb15050f0afa19e7dbe073cf2db95267fc | 4b911efe9f8cdec16ecb2a983e16f772be05076c | refs/heads/master | 2021-12-30T13:03:57.019319 | 2021-12-29T07:41:43 | 2021-12-29T07:41:43 | 193,836,099 | 0 | 0 | null | false | 2019-10-23T01:58:03 | 2019-06-26T05:35:28 | 2019-10-17T02:10:24 | 2019-10-23T01:58:02 | 62 | 0 | 0 | 0 | Python | false | false | from math import pi
from common_utils.cv_drawing_utils import Spirograph
from streamer.cv_viewer import cv_simple_image_viewer
spirograph = Spirograph(r=200, partitions=12, nodes=[0, pi/2, pi, 3*pi/2])
quit_flag = cv_simple_image_viewer(img=spirograph.sample(), preview_width=1000) | UTF-8 | Python | false | false | 282 | py | 65 | spirograph_test.py | 62 | 0.776596 | 0.730496 | 0 | 6 | 46.166667 | 79 |
alexisduque/kodo-network-coding | 19,490,561,612,619 | ef8df72132fa793a758ebff86b33d7d7677d1b7f | 98bb8950b3087ccaba0cdf6b90d0ffbc2a5a77ff | /python/benchmark.py | 5e8a279d11c0bec550ca8ed69ee5eab3a03223d8 | [] | no_license | https://github.com/alexisduque/kodo-network-coding | 4767114bacc7618d70d98f000a128ffb7282dc90 | d58a4ea086b0a686d226efa34e4db399c9e7b2ce | refs/heads/master | 2020-07-04T11:33:51.630664 | 2016-09-08T11:35:25 | 2016-09-08T11:35:25 | 67,336,656 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python
# encoding: utf-8
import time
import os
import sys
import argparse
import kodo
def run_coding_test(algorithm, field, symbols, symbol_size):
"""Run a timed encoding and decoding benchmark."""
# First, we measure the combined setup time for the encoder and decoder
start = time.clock(... | UTF-8 | Python | false | false | 4,458 | py | 29 | benchmark.py | 23 | 0.633917 | 0.630328 | 0 | 167 | 25.694611 | 75 |
zorzalerrante/datagramas | 12,223,476,943,465 | 6776b707e9c3ce03dcf1928fb926b14b0e96ea08 | 5d51244fa70ccf2794b1c50d0cacd798e7f78db5 | /datagramas/sketch.py | 8a0d24f9b9c028c48db7a93aa7a200790b38324b | [
"BSD-3-Clause"
] | permissive | https://github.com/zorzalerrante/datagramas | 4e3cf7f99203e788f6d7fd91e96f34d7736b468a | d1ea8ae8d9d69f26d6d62f5d9cbc63d230773205 | refs/heads/master | 2021-05-31T17:29:05.807823 | 2016-05-06T01:54:25 | 2016-05-06T01:54:25 | 20,466,491 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import unicode_literals
import uuid
import jinja2
import os
import copy
from IPython.display import HTML
from cytoolz.dicttoolz import valmap, merge
from IPython.display import display_html
from seaborn import color_palette
from matplotlib.colors import rgb2hex
from .js_utils import _dump_json, d3jsObj... | UTF-8 | Python | false | false | 13,639 | py | 50 | sketch.py | 40 | 0.612362 | 0.610309 | 0 | 341 | 38.997067 | 142 |
chainsawcr/mozio-proj | 15,522,011,834,875 | 868997a060b9d90dc470a3f90100f6211a1a26a5 | 7da23446d2f78d0ce6ee2a167e0e729bb3627947 | /mozio_app/mixins.py | 545af2891f4f4802a9a36740a0b9fd5e368b0416 | [] | no_license | https://github.com/chainsawcr/mozio-proj | 4ea5d48794e35cba21c4cc2d100262cc68ec3810 | 7decda64e93af427982865e7ec3df2e9822cbd4d | refs/heads/master | 2021-01-18T14:36:29.878290 | 2014-05-05T05:24:00 | 2014-05-05T05:24:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import messages
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse_lazy
from rnd_itr_app import models
class MessageMixin(object):
@property
def success_message(self):
return ''
def form_valid(self, form):
messages.add_message(
... | UTF-8 | Python | false | false | 2,462 | py | 16 | mixins.py | 10 | 0.592201 | 0.592201 | 0 | 80 | 29.775 | 78 |
nsmith0310/Programming-Challenges | 4,982,162,079,200 | 4699eb447a7dc1d036cb4fee96f04ae2ea2fd69f | 4351a81d4a4fae778711643cb9644534e595920d | /Python 3/LeetCode/lc387.py | b310f1b719a23f1460f9004c489a712b26fbd435 | [] | no_license | https://github.com/nsmith0310/Programming-Challenges | ba1281127d6fa295310347a9110a0f8998cd89ce | 7aabed082826f8df555bf6e97046ee077becf759 | refs/heads/main | 2023-08-13T14:47:10.490254 | 2021-10-13T04:35:57 | 2021-10-13T04:35:57 | 416,565,430 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def firstUniqChar(self, s: str) -> int:
if s=="":
return -1
s2 = list(set(s))
l=[]
l2=[]
for x in s2:
l.append([s.count(x),x])
for x in l:
if x[0]==1:
l2.append(x)
if l2==[]:
... | UTF-8 | Python | false | false | 459 | py | 910 | lc387.py | 660 | 0.337691 | 0.30719 | 0 | 20 | 21.3 | 43 |
FergusFettes/wien_networking | 17,051,020,201,864 | aee5e584ec6c818ec7bf0ebdf18053ab51454ff1 | a424e751eb4c31af7ef1088053e9dbe5af81f71e | /quotesbot/flohmarketbot/spiders/toscrape-css.py | a305167c2dbe1a57db2985c9b97cf88fc7b752d5 | [] | no_license | https://github.com/FergusFettes/wien_networking | 1f093f6eaf229adb874b39922aadbfcdd4254212 | dbd5f1d3219fec0cd0e68176bb0428934801cb95 | refs/heads/master | 2021-07-22T03:08:47.364320 | 2020-09-23T21:11:19 | 2020-09-23T21:11:19 | 216,395,477 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import scrapy
class ToScrapeCSSSpider(scrapy.Spider):
name = "toscrape-css"
start_urls = [
'http://quotes.toscrape.com/',
]
def parse(self, response):
for quote in response.css("div.quote"):
yield {
'text': quote.css("span.text::text... | UTF-8 | Python | false | false | 2,388 | py | 6 | toscrape-css.py | 4 | 0.535595 | 0.5134 | 0 | 67 | 34.641791 | 124 |
acse-7ccead1f/ci_mpm | 12,704,513,266,872 | d357ae42030a931adc7de3882424d24e5802b42a | bdd730f92ea5b8d2583342443057d23c9c3c137f | /tests/test_sin.py | ab83fd0094e4c29b7618efec9102810591bc06b9 | [] | no_license | https://github.com/acse-7ccead1f/ci_mpm | 0ab39ff68207bdbaee51dc1d97de082d1caccc85 | 1867ccfd4e9ad7022c7879147d652418bfed1074 | refs/heads/master | 2023-09-04T19:05:23.290976 | 2021-10-26T02:14:18 | 2021-10-26T02:14:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import numpy as np
from simple_functions import my_sin
class TestPi(object):
'''Class to test our constants are computed correctly'''
def test_sin(self):
'''Test computation of pi'''
mysin = my_sin(2)
assert np.isclose(mysin, np.sin(2), atol=1e-12)
| UTF-8 | Python | false | false | 285 | py | 3 | test_sin.py | 2 | 0.642105 | 0.624561 | 0 | 11 | 24.818182 | 60 |
RubenMeijs/WISB256 | 953,482,760,260 | 581292e48b0c1b2cb8b420b8ac579dc62f37d959 | 77fc4e319443c60d914e61ab08909fa82a202588 | /EulerOpdrachten/euler3.py | 1e2ca8d7ac333154ea7e49cddebf78134d5be860 | [] | no_license | https://github.com/RubenMeijs/WISB256 | dc8aad84610b749e0e4263dbcf6e8772546dac65 | 3239811c93f21c23cb31930c2d809fe64db9a215 | refs/heads/master | 2020-05-17T00:20:32.108106 | 2015-06-09T09:33:31 | 2015-06-09T09:33:31 | 34,315,122 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
getal = float(input())
wortel = int(math.ceil(math.sqrt(getal)))
delers = range(2,wortel+1)
priemdeler =[]
for i in delers:
if getal % i == 0:
priemdeler.append(i)
print(priemdeler)
for i in priemdeler:
if i != 0:
for n in range(0, len(priemdeler)):
if priemdeler[n]... | UTF-8 | Python | false | false | 460 | py | 18 | euler3.py | 18 | 0.584783 | 0.569565 | 0 | 24 | 18.208333 | 60 |
Charolf/Charlie1998 | 7,387,343,799,762 | c5a1ff0fc0694f516e6bfad97e7f09b63326c594 | 49f7b617500e6d263fd3bcc916faa40eec36f618 | /cpe101/lab6/char/char.py | ab8a107fd11730e403cee26353f83653acbd8389 | [
"MIT"
] | permissive | https://github.com/Charolf/Charlie1998 | c2d0f6e75ab4c6f45f572f6679c13eaa1a767cfe | ca858a7b6c22d961068a1c7395676c7f5f6fdf58 | refs/heads/master | 2019-07-02T12:56:13.475336 | 2018-06-29T20:07:33 | 2018-06-29T20:07:33 | 122,789,759 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Lab 6 char
#
# Name: Charlie Huang
# Instructor: S. Einakian
# Section: CPE-101-05/06
def is_lower_101(letter):
number = ord(letter)
if 65 <= number <= 90:
return False
elif 97 <= number <= 122:
return True
def char_rot_13(letter):
number = ord(letter)
new_number = number + 13
if 65 <= number <= 90:
if ... | UTF-8 | Python | false | false | 542 | py | 180 | char.py | 88 | 0.647601 | 0.560886 | 0 | 28 | 18.392857 | 32 |
Sabbirdiu/Django-ml-Healthcare-Prediction-Website | 17,317,308,147,806 | a0fb082172691ca881a8fab2914f4812be4b552f | 9faa9d0eb2cbc8e6252240ffa5bb8a44d1e650f0 | /accounts/urls.py | 331bebdf9f0711e48d46d7ef841161b4f9c869b7 | [] | no_license | https://github.com/Sabbirdiu/Django-ml-Healthcare-Prediction-Website | 5af507f95f046efbac047b986b46088484f2cc77 | 5ee6a102630cf7ee30470dad5637adb4e9ffd744 | refs/heads/main | 2023-07-22T18:12:45.085836 | 2020-12-25T06:33:38 | 2020-12-25T06:33:38 | 322,766,976 | 8 | 2 | null | false | 2023-07-10T19:49:55 | 2020-12-19T04:34:10 | 2023-05-23T13:55:36 | 2023-07-10T19:48:12 | 4,758 | 4 | 3 | 1 | CSS | false | false | from django.urls import path
from .views import *
urlpatterns = [
path('patient/register', RegisterPatientView.as_view(), name='patient-register'),
path('login', LoginView.as_view(), name='login'),
path('logout', LogoutView.as_view(), name='logout'),
path('doctor/register', RegisterDoctorView.as_view(... | UTF-8 | Python | false | false | 560 | py | 28 | urls.py | 11 | 0.698214 | 0.698214 | 0 | 14 | 39.071429 | 101 |
24HeuresINSA/issue-web-service | 18,691,697,695,290 | 39eb81024628cb6d3f00997894b8247b93d3a7b0 | 05e0439cbaaf29343020e8966da71de1d21dc8ae | /src/Issue.py | 4087918a383b8c96d55d41136a76e8b31f764ff0 | [] | no_license | https://github.com/24HeuresINSA/issue-web-service | 809355b4de37f0a39f0df24ad058e6074885d135 | 928b0c9849d1f8d5ab39efd5d5814d534499540d | refs/heads/main | 2023-07-14T12:39:31.900679 | 2021-08-24T20:20:52 | 2021-08-24T20:20:52 | 324,833,599 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os.path
import requests
import json
import datetime
class Issue:
def __init__(self, repo, token, data=None, milestone=None, git_platform=None):
"""
:param repo: the github repository to push issues with format username|organisation/project for github
and username|organisation/[subp... | UTF-8 | Python | false | false | 7,590 | py | 14 | Issue.py | 4 | 0.524506 | 0.523452 | 0 | 223 | 33.035874 | 114 |
pedcremo/wifibytes-server-django | 17,729,625,030,909 | 64b738c5c4aefb42cbb7b773c4b2c73f95768450 | da7451bf1fc8f72e9fe400e71543f2f51f79c399 | /wifibytes/pagina/models.py | 1034a23d5aa183916dea5a12311c9abb1f62d74e | [] | no_license | https://github.com/pedcremo/wifibytes-server-django | f507a2b5539d6854467754ede7e4ea823a684e09 | d815d663f3ccb8b2741ff7afda27c3e16d526722 | refs/heads/master | 2020-04-01T14:07:24.070611 | 2019-02-20T19:18:23 | 2019-02-20T19:18:23 | 153,281,271 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding:utf-8
from django.db import models
from tinymce.models import HTMLField
class Home(models.Model):
id = models.IntegerField(primary_key=True, editable=False)
titulo = models.CharField(verbose_name=("titulo"), max_length=100, blank=False)
subtitulo = models.CharField(verbose_name=("subtitulo"), ma... | UTF-8 | Python | false | false | 4,721 | py | 128 | models.py | 102 | 0.633129 | 0.615336 | 0 | 122 | 37.696721 | 113 |
saerdnaer/emf-camp-website | 3,650,722,205,967 | 9747bf3a4517e242a33f8136ac4127bc516908ec | 71fd6e7e59933831d751a7b084afcdae4bacd223 | /apps/volunteer/training.py | 7b04f34dfb1433fd5545ea9000808bfd3208ae28 | [] | no_license | https://github.com/saerdnaer/emf-camp-website | ebe47400c211f5bfad54f66f8571ae35e41e08a4 | d76cd25dea056e09f24f627b1387c537e0a56282 | refs/heads/master | 2020-03-27T19:37:00.072034 | 2018-09-01T11:25:01 | 2018-09-01T11:25:01 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
from flask import render_template, flash, current_app as app, redirect, url_for
from wtforms import SubmitField, BooleanField, FormField, FieldList
from wtforms.validators import InputRequired
from main import db
from models.volunteer.role import Role
from models.volunteer.volunteer import Volunteer
... | UTF-8 | Python | false | false | 2,756 | py | 45 | training.py | 31 | 0.664369 | 0.661466 | 0 | 81 | 33.012346 | 113 |
anonymousAuthors2023/GRU_fusion_COVID-19 | 15,547,781,621,262 | 2fd288b000419ebaca9b8f0fdee869787ad475af | 8376fbbd1b10750c7ca02aecc300f15b133a77ff | /SEIR.py | 8c63e4816532b17620e6e6e31ed330b26c697448 | [] | no_license | https://github.com/anonymousAuthors2023/GRU_fusion_COVID-19 | 117d7de06a42351fd16c975c42641e3b24a84097 | 7a262ff61dfe2b230325baf2fa6281354a1b3a41 | refs/heads/main | 2023-08-22T03:24:56.732662 | 2021-10-22T06:04:23 | 2021-10-22T06:04:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import pandas as pd
from scipy.integrate import solve_ivp
from scipy.optimize import basinhopping
data_dir = "../data/Italy.csv"
# Population of selected countries:
# Italy = 60431283
# Germany = 82927922
# Russia = 145934462
# Denmark = 5792202
# Austria = 900639... | UTF-8 | Python | false | false | 3,109 | py | 3 | SEIR.py | 3 | 0.485365 | 0.422322 | 0 | 99 | 29.424242 | 129 |
kljushin/cursor_homeworks | 12,352,325,958,690 | 04fe09787d371707c39f71eb4c8367bdc0dd25cc | 13b73966ba258a23fe8e911280943c701510bece | /hw14/hw14.py | 1ef2c4cdb46265db0bac7fc9490c5b3f1b8aea22 | [] | no_license | https://github.com/kljushin/cursor_homeworks | e270c23ff6de6e9b3fa3758be545e8efcea33a55 | f54f0ad69ecef08cad939b1ebea88b3f2d0e8875 | refs/heads/master | 2023-04-01T13:00:22.484305 | 2021-04-14T09:33:44 | 2021-04-14T09:33:44 | 341,910,947 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import glob
import concurrent.futures
def find_pattern_line(path, pattern):
result = set()
with open(path) as file:
for line in file:
if pattern in line:
result.add(line)
return result
def find_by_pattern_threads(path, pattern):
files = glob.glob(f'{pa... | UTF-8 | Python | false | false | 1,402 | py | 25 | hw14.py | 21 | 0.638374 | 0.638374 | 0 | 46 | 29.478261 | 101 |
TheCatWalk/precipitation_prediction_using_bdlstm_in_bangladesh | 5,033,701,700,893 | bdccdb5fd270b07214506612491e0d35067edfa2 | f3febe869118736ed313879997439b01af861529 | /rainfall_tutorial_withcomments.py | 623c70e363523856235920291ddc57114376cbae | [] | no_license | https://github.com/TheCatWalk/precipitation_prediction_using_bdlstm_in_bangladesh | 4963f9393a6a966f76bf5cd3d739628b2cdcb325 | a0ea3185c717a40967faeeecf6dadfa970fa6da3 | refs/heads/main | 2023-01-04T11:37:18.617674 | 2020-10-31T10:48:10 | 2020-10-31T10:48:10 | 308,818,875 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from pandas.plotting import register_matplotlib_converters
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rc
from pylab import rcParams
import seaborn as sns
import tensorflow as tf
from tensorflow import keras
from keras.layers import (
Input,
Dense,
... | UTF-8 | Python | false | false | 8,945 | py | 108 | rainfall_tutorial_withcomments.py | 1 | 0.681945 | 0.666182 | 0 | 273 | 30.758242 | 146 |
openstack/charm-neutron-gateway | 3,547,643,033,525 | 72156fca5247df7839b2d4e0f48ba9dd73fdb3a3 | acddbd8b628ed865aba3b8f7dc06d44090206ee0 | /actions/actions.py | 6ad5d0152d8fde81e7b6a4462c9936225ec68bfd | [
"GPL-3.0-only",
"GPL-1.0-or-later",
"Apache-2.0"
] | permissive | https://github.com/openstack/charm-neutron-gateway | a01c12625adb17f7be1a43acce28558e9f101bc3 | 500a8bd029be78558b84fa3a7d1552e82e8970eb | refs/heads/master | 2023-08-16T23:18:17.505227 | 2023-08-09T00:37:46 | 2023-08-09T00:37:46 | 52,858,829 | 26 | 20 | Apache-2.0 | false | 2023-05-01T02:17:42 | 2016-03-01T07:55:41 | 2023-04-30T18:40:42 | 2023-04-30T10:30:40 | 2,892 | 19 | 14 | 0 | Python | false | false | #!/usr/bin/env python3
import os
import socket
import sys
from keystoneauth1 import identity
from keystoneauth1 import session
from neutronclient.v2_0 import client
import yaml
_path = os.path.dirname(os.path.realpath(__file__))
_hooks_dir = os.path.abspath(os.path.join(_path, "..", "hooks"))
def _add_path(path):
... | UTF-8 | Python | false | false | 10,804 | py | 154 | actions.py | 112 | 0.585709 | 0.584413 | 0 | 321 | 32.657321 | 79 |
MikkieR/fermi | 2,946,347,603,032 | 380a27d967adace226999b474e884f4013d6f83a | 0513bc323766be3fc14f2800d5fb095dc8a4eaa9 | /Deconvolution/simulate.py | 7c6ef988a52a68616b33669c1c3fabec654420e0 | [] | no_license | https://github.com/MikkieR/fermi | ad4a4e10f2e741b2c7b4013b5f6b9d9ef89b1d5b | 33417bf41771f46c7537e106aff5dce5a74e9d77 | refs/heads/master | 2020-04-08T13:52:12.001081 | 2019-04-19T16:09:50 | 2019-04-19T16:09:50 | 159,410,535 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import random
import math
#import cv2 as cv2
from astropy.io import fits
import numpy as np
import matplotlib.pyplot as plt
import multiprocessing
from ds9_cmap import *
from make_fermi_maps import *
_fname_prefold = '/media/mariia/Maxtor/'
_fname_data = 'database5/'
_fname_database = _fname_prefold + _fname... | UTF-8 | Python | false | false | 7,464 | py | 21 | simulate.py | 14 | 0.51313 | 0.469453 | 0 | 180 | 40.466667 | 136 |
Tnek/binaryninja-moxie | 15,444,702,416,770 | 0fdaa9bf0163249a679a4c1286d7fc69bd1770ab | 2a4620f6f36d94fb7de879c97af6b6442690f0ba | /__init__.py | 45923975f13a50bf878e861e19e4908942d4df2f | [] | no_license | https://github.com/Tnek/binaryninja-moxie | e0819d79a4579803fb0f77a5cfe842692631aec1 | 02cc6fdd5dd79d3c8cc8918eb3cacb36b00b6861 | refs/heads/master | 2020-04-03T07:31:04.543687 | 2018-10-29T15:10:24 | 2018-10-29T15:10:24 | 155,105,011 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from binaryninja import Architecture, BinaryViewType, Endianness
from Moxie import *
Moxie.register()
BinaryViewType['ELF'].register_arch(0xdf, Endianness.BigEndian, Architecture["moxie"])
| UTF-8 | Python | false | false | 191 | py | 5 | __init__.py | 4 | 0.806283 | 0.801047 | 0 | 5 | 37 | 86 |
k3vinfoo/NBAi | 18,476,949,330,717 | 0717b274f171b34facd09f13d0ffa572bdc0a10d | f5ed1c51e35b6ca91c86289f8b4718e1453ab045 | /tensorflow_start.py | 13f5df5b41ea40e172711c8e9c8908e61e5795e6 | [] | no_license | https://github.com/k3vinfoo/NBAi | 81a1b9d367f36873e1556440f8e4a1a3fd59a767 | 4d3948f3fb184c59ac9a0e23982afc0658dcb2c8 | refs/heads/master | 2021-05-10T19:00:58.959449 | 2017-09-24T12:29:07 | 2017-09-24T12:29:07 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tensorflow as tf
filename = "scrapped_withRuns.csv"
filename_queue = tf.train.string_input_producer([filename])
def file_len(fname):
with open(fname) as f:
for i, l in enumerate(f):
pass
return i + 1
def prediction_model(n=1, log_progress=False):
with tf.Session() as ses... | UTF-8 | Python | false | false | 3,623 | py | 7 | tensorflow_start.py | 4 | 0.585495 | 0.547838 | 0 | 80 | 43.8125 | 232 |
hchache/Data-Incubator-Challenge | 12,859,132,093,040 | 31e77cdd292e8ea124bc9e229a7ac8c28fbccfef | aa44c3bada1eb6dad2207c635dcae90611a09d5c | /Question 2.py | 67bd87c92a027a499a3d0182f4fb29de2882a3c5 | [] | no_license | https://github.com/hchache/Data-Incubator-Challenge | 01a91bc7b31389704b09c4102bc04ea5bbf65ce9 | 3f6b316f57c60dca50e475e2972cd6756902d11e | refs/heads/master | 2020-03-14T05:42:21.381294 | 2018-04-30T14:59:45 | 2018-04-30T14:59:45 | 131,469,880 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
###### Author: Hitesh Sahadeo Chache
#
# Jupyter Link: https://github.com/hchache/Data-Incubator-Challenge/blob/master/Question%202.ipynb
#
###### Code - Start
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import math
from scipy import interpolate
from scipy.stats import chisquare
from s... | UTF-8 | Python | false | false | 7,152 | py | 6 | Question 2.py | 3 | 0.711649 | 0.692071 | 0 | 176 | 39.619318 | 389 |
theromis/mlpiper | 15,676,630,654,301 | bced8b0ff19d07380c70622f9838e32ff82dd0e5 | 6e423cddd8698bc662bcc3208eb7a8fdb2eb0d72 | /mlops/parallelm/mlops/stats/table.py | 8bd3b851455f58bc97cb91825d0b9bedbf96f8ec | [
"Apache-2.0"
] | permissive | https://github.com/theromis/mlpiper | 7d435343af7b739767f662b97a988c2ccc7665ed | 738356ce6d5e691a5d813acafa3f0ff730e76136 | refs/heads/master | 2020-05-05T04:44:00.494105 | 2019-04-03T19:53:01 | 2019-04-03T22:02:53 | 179,722,926 | 0 | 0 | Apache-2.0 | true | 2019-04-05T17:06:02 | 2019-04-05T17:06:01 | 2019-04-03T22:02:57 | 2019-04-05T17:02:52 | 14,857 | 0 | 0 | 0 | null | false | false | """
MLOps supports propagating a table up to the PM system. This file contains table definition methods.
"""
import os
import copy
import six
from parallelm.mlops.mlops_env_constants import MLOpsEnvConstants
from parallelm.mlops.stats.mlops_stat import MLOpsStat
from parallelm.mlops.stats_category import StatGraphTyp... | UTF-8 | Python | false | false | 9,702 | py | 712 | table.py | 323 | 0.546794 | 0.53927 | 0 | 289 | 32.570934 | 119 |
fujiazhiyu/pdfcontract | 3,856,880,641,508 | be191ac539ef692e9b9380f1b3cfd3de3aa96631 | 62adbf5107f65094a70e40cbcefa5c8db71283c3 | /flaskr/contract.py | de6767e47c33c602aeed50818ec7d170a7624c00 | [
"Apache-2.0"
] | permissive | https://github.com/fujiazhiyu/pdfcontract | 9156c6afb960f8ea4e6b75c2aaefc09f4858449f | 2952662fceb4d907c72a74e24dae1fb364fefdf9 | refs/heads/master | 2022-11-25T14:30:31.539822 | 2020-02-15T06:39:35 | 2020-02-15T06:39:35 | 201,868,928 | 0 | 0 | Apache-2.0 | false | 2022-11-22T03:57:19 | 2019-08-12T06:14:41 | 2020-02-15T06:39:37 | 2022-11-22T03:57:16 | 10,561 | 0 | 0 | 4 | HTML | false | false | # -*- coding: utf-8 -*-
from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for, Flask, make_response
)
from flask_weasyprint import HTML, CSS, render_pdf
from urllib.parse import quote
from xpinyin import Pinyin
import os
import sys
import time
# from flask import current_app as app
... | UTF-8 | Python | false | false | 4,122 | py | 20 | contract.py | 3 | 0.697289 | 0.693775 | 0 | 95 | 40.936842 | 314 |
MyPlanTodo/DeepStudy | 11,123,965,312,737 | 717074552e4b4394bd262574a968388ba4aa680d | 3ab6f9b780fe6bbe5c0e59d2d098ef912d1b087b | /connection.py | d6caa6afe6141034fb2d62f9459e8d052d0e3215 | [] | no_license | https://github.com/MyPlanTodo/DeepStudy | 663546e250c5c520e1dbcaa22c0e112308e66e06 | 7ddea4306352c3a5416007ff461ccb19dab94f4a | refs/heads/master | 2021-01-20T12:55:44.075466 | 2017-02-05T16:46:46 | 2017-02-05T16:46:46 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #coding=utf-8
#!/usr/bin/env python
import random
class Connection(object):
def __init__(self,upstream_node,downstream_node):
'''
初始化连接,权重初始化为一个很小的随机值
:param upstream_node: 上游节点
:param downstream_node: 下游节点
'''
self.upstream_node = upstream_node
self.downstr... | UTF-8 | Python | false | false | 1,510 | py | 15 | connection.py | 15 | 0.549645 | 0.544681 | 0 | 58 | 23.310345 | 78 |
katerina7479/python-units-of-measure | 3,281,355,052,909 | df0912566fd22229441647afbeb37bbe00fffe9b | a48271319207e2e178c41ab29dbaecb04bc5963c | /pyuom/Angle.py | ece13af44f58621a352815297fccd3067c0c4aed | [
"MIT"
] | permissive | https://github.com/katerina7479/python-units-of-measure | eee8ea8fcb9aec98a6eb0cd872069c01dd921c1e | 436829f7aeeec75999bece3736f0eb4e39daf0ad | refs/heads/master | 2016-08-07T02:20:39.713168 | 2013-05-31T04:35:04 | 2013-05-31T04:35:04 | 10,397,077 | 3 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | from PhysicalQuantity import PhysicalQuantity
from UnitOfMeasure import UnitOfMeasure
from math import pi
class Angle(PhysicalQuantity):
def __init__(self, value, unit):
super(Angle, self).__init__(value, unit)
# Degrees
new_unit = UnitOfMeasure(
u"\u00b0",
lambd... | UTF-8 | Python | false | false | 853 | py | 17 | Angle.py | 16 | 0.560375 | 0.549824 | 0 | 34 | 24.088235 | 48 |
bbc94/Algorithm | 1,065,151,932,057 | 1a953e16910865eff618050b632cde9006a4ec1e | 618a7393d82099bc70fcda5ff248d11103e1756b | /Next_bigger_Num.py | ea46b1310bfdb0d920082a60883d9b797e10ac93 | [] | no_license | https://github.com/bbc94/Algorithm | fd3bddb6e6fc58b565fa3298b498342ddeace574 | 90d846343d3115a97f90024fda3cfeef3f476f6c | refs/heads/master | 2020-04-20T05:23:36.591255 | 2019-02-17T06:03:22 | 2019-02-17T06:03:22 | 168,655,006 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def solution(n):
n_bi = bin(n).count('1')
a=n+1
while a>n:
b=str(bin(a)).count('1')
if b==n_bi:
return a
else:a+=1
print(solution(78)) | UTF-8 | Python | false | false | 184 | py | 28 | Next_bigger_Num.py | 27 | 0.451087 | 0.418478 | 0 | 11 | 15.818182 | 32 |
SkyThes/lilygo-t5-4.7-image-webserver | 15,925,738,761,636 | 80ff61c8f304c2acbfeab143704252dcffd051d4 | 16fb24ec28de28557188b67c70117eed20c9d056 | /server/utils.py | c845c197d7d383c409bbb9a8b67b8ddccdeae275 | [] | no_license | https://github.com/SkyThes/lilygo-t5-4.7-image-webserver | dfcf6a2496a74d32ffca54c31111cdbb0f076cf6 | 880d50b847bd89db97ff0c96835eb91f538683d3 | refs/heads/master | 2023-05-08T02:28:43.216167 | 2021-05-31T18:24:19 | 2021-05-31T18:24:19 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
import numpy as np
def resize(img, max_width, max_height):
'''Resize image so it fits within our '''
ratio = float(img.shape[1]) / float(img.shape[0])
ratio_resize = float(max_width) / float(max_height)
if ratio < ratio_resize:
# we can scale to max height
# calculate the tar... | UTF-8 | Python | false | false | 1,868 | py | 4 | utils.py | 3 | 0.602784 | 0.549786 | 0 | 47 | 38.765957 | 82 |
szonespider/wuhan | 17,136,919,534,276 | a47d9624638e2465c68a7ede1c09a430c4480e13 | b8bf930189a3cfd60924edc69f2735d388f91e36 | /work/zhu/shandong/tengzhou.py | 67b539dc5e67b6e8d87b7ad6cc41f0b3d7976baf | [] | no_license | https://github.com/szonespider/wuhan | 170c4795d48fe47294276d3ad7ff5841186ee613 | 25d40929f7b451d36a34a1e44fe376c47e04d04e | refs/heads/master | 2020-04-01T22:40:54.602013 | 2019-01-29T08:46:45 | 2019-01-29T08:46:45 | 153,721,750 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import pandas as pd
import re
from lxml import etree
from selenium import webdriver
from bs4 import BeautifulSoup
from lmf.dbv2 import db_write
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException, StaleEl... | UTF-8 | Python | false | false | 4,264 | py | 310 | tengzhou.py | 290 | 0.581853 | 0.556169 | 0 | 154 | 26.058442 | 96 |
wongcyrus/ite3101_introduction_to_programming | 8,478,265,460,675 | 0ff60b8270b7e7a6eb108fc88e59325d6c6302a3 | c9952dcac5658940508ddc139344a7243a591c87 | /tests/lab05/test_ch05_t02_input.py | eac080cd260056a9dfdd0512147b72e5eb5e8ec2 | [] | no_license | https://github.com/wongcyrus/ite3101_introduction_to_programming | 5da1c15212528423b3df91997327fe148abef4de | 7cd76d0861d5355db5a6e2e171735bee2e78f829 | refs/heads/master | 2023-08-31T17:27:06.193049 | 2023-08-21T08:30:26 | 2023-08-21T08:30:26 | 136,574,036 | 3 | 2 | null | false | 2023-08-21T08:30:28 | 2018-06-08T06:06:49 | 2022-11-30T13:01:32 | 2023-08-21T08:30:27 | 368 | 3 | 3 | 0 | Python | false | false | import unittest
from unittest.mock import patch
from tests.unit_test_helper.console_test_helper import *
class TestOutput(unittest.TestCase):
def test(self):
user_input = ["Cyrus"]
with patch('builtins.input', side_effect=user_input):
temp_globals, temp_locals, content, output = exec... | UTF-8 | Python | false | false | 461 | py | 341 | test_ch05_t02_input.py | 334 | 0.661605 | 0.64859 | 0 | 18 | 24.611111 | 92 |
jason-su/UCGNet | 15,522,011,853,725 | cd40631e9702901bc5d183825d7a23f129b515dc | 70261e072dbabe585aedcfa1da6373cb8651ee65 | /custom/iii_1_extract_name.py | faef951493481fcc4cdd90237a9475f213db2766 | [
"BSD-3-Clause"
] | permissive | https://github.com/jason-su/UCGNet | a6081463c0a039db68a1567efe09b2b44cb2aeed | 649209404119fb96cbf8b8f172575d025c1e9fb6 | refs/heads/main | 2023-02-20T13:11:07.830124 | 2021-01-22T13:32:35 | 2021-01-22T13:32:35 | 331,953,165 | 5 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #coding:utf-8
# P02 批量读取文件名(不带后缀)
import os
from Constants import crop_1000_xml_dir,train_name_txt_1000
path_list = os.listdir(crop_1000_xml_dir) # os.listdir(file)会历遍文件夹内的文件并返回一个列表
fp = open(train_name_txt_1000,"w")
num =0
for file_name in path_list:
fp.write(file_name.split(".")[0] + "\n")
num +=1
fp.... | UTF-8 | Python | false | false | 452 | py | 26 | iii_1_extract_name.py | 25 | 0.681122 | 0.614796 | 0 | 18 | 20.722222 | 79 |
kinow/decyclify | 10,539,849,789,950 | 7ebf400df32c6b903d08e43ece283d8f6fc9b84d | 0ce0beb29c4c3cdfce946987944a3b7ab8513018 | /setup.py | 8a011cf19941d60291ead0d2e2097991becc48d3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/kinow/decyclify | f8b42eb2a7a2304c4b3d9f73f06c6fe7d0b669c0 | e37d7eaec5dd85483572c4065e1840a0498bd14e | refs/heads/master | 2023-02-11T00:24:23.927988 | 2020-12-29T05:43:11 | 2020-12-29T05:43:11 | 280,767,787 | 3 | 0 | Apache-2.0 | false | 2020-07-25T05:46:01 | 2020-07-19T01:08:45 | 2020-07-22T06:12:06 | 2020-07-25T05:46:00 | 18 | 2 | 0 | 7 | Python | false | false | #!/usr/bin/env python
# Copyright 2020 Bruno P. Kinoshita
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | UTF-8 | Python | false | false | 1,809 | py | 13 | setup.py | 7 | 0.658928 | 0.641238 | 0 | 65 | 26.830769 | 125 |
joaduo/python-simplerpc | 15,762,529,995,012 | b225eb440bd6f86c0b8dae9802029bbe49627ab5 | 872a7212f72e1a2ca267ba69d858fa46f53ff5a6 | /simplerpc/expose_api/javascript/ClassToJsUnitTest.py | 1366a606d28213787b46c8ffaa1899d984417253 | [] | no_license | https://github.com/joaduo/python-simplerpc | fc57d3d53689c8c4ee565461c7c0e99a157b4886 | 4b935f5ada52e575f0097e85229e6e879e9981af | refs/heads/master | 2016-09-05T10:22:45.352915 | 2014-12-06T02:21:48 | 2014-12-06T02:21:48 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
'''
Simple RPC
Copyright (c) 2013, Joaquin G. Duo
'''
from simplerpc.base.SimpleRpcLogicBase import SimpleRpcLogicBase
from simplerpc.expose_api.javascript.ClassToJs import ClassToJs
from simplerpc.expose_api.javascript.TemplatesCollector import TemplatesCollector
from string import Template
imp... | UTF-8 | Python | false | false | 2,114 | py | 70 | ClassToJsUnitTest.py | 66 | 0.69158 | 0.689215 | 0 | 57 | 36.087719 | 81 |
giorgoschionas/IEEEXtreme15.0 | 17,274,358,481,967 | dc65b553e042a906b6aaadc88212f8d2d30c5b88 | 6b933209fc52ccbd02461bb5bf68d2bfb5e3f8ae | /wordsearch.py | 52d769082f312bc4aff681d3e5c8d6f71e710fe9 | [] | no_license | https://github.com/giorgoschionas/IEEEXtreme15.0 | 4ec1441f4dcc84417cfd1321ef6c1f12bf6c3057 | 84a0308d7860dc8bd22cacf5ae2d2df81b9868d8 | refs/heads/master | 2023-08-27T12:56:20.808748 | 2021-10-26T13:53:55 | 2021-10-26T13:53:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # a simple parser for python. use get_number() and get_word() to read
def parser():
while 1:
data = list(input().split(' '))
for number in data:
if len(number) > 0:
yield(number)
input_parser = parser()
def get_word():
global input_parser
return next(input_parse... | UTF-8 | Python | false | false | 2,606 | py | 17 | wordsearch.py | 16 | 0.423638 | 0.412893 | 0 | 102 | 24.490196 | 69 |
LeGaulois/soc | 10,075,993,323,117 | bbfb6c3c075d99e920906b0e2240f2400918995f | 0a1a404329a164c9fd240b5a6a48f2967b6cc7c6 | /sources/applications/formulaires.py | 7c425c9ecc971cb283f509c0c6a03ccb5fa7d7cb | [] | no_license | https://github.com/LeGaulois/soc | 52247e9ba24fb542b6abf1c31e8b9c39114d4c65 | 8111620f43b5e0e1d12925de2c03892c7f013e64 | refs/heads/master | 2021-01-17T14:40:38.944322 | 2016-05-17T13:09:23 | 2016-05-17T13:09:23 | 51,772,843 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #-*- coding: utf-8 -*-
from django import forms
from django.conf import settings
import ConfigParser
import codecs
BASE=settings.BASE_DIR+'/'
class formFiltreApplis(forms.Form):
'''
Formulaire de filtrage des applications
'''
def __init__(self,*args,**kwargs):
self.criticite=kwargs.pop('critic... | UTF-8 | Python | false | false | 5,209 | py | 90 | formulaires.py | 56 | 0.56196 | 0.554467 | 0 | 150 | 33.606667 | 214 |
Gaur2025/face-detection-and-counting | 14,035,953,131,194 | 6d344e9c01cc58ee955754f03cbb0503c92e2f35 | 86ea6871edd69256d74afce754e278318bbb6229 | /face_and_eye_detection_using_webcam.py | 4ed1bf4898d785ade45173830adf56f6ce336a28 | [] | no_license | https://github.com/Gaur2025/face-detection-and-counting | dc9d09359734fd1038b04ce7971f525ca9944551 | 4efe9ca4239e719d97bf0516fe4076175663eb5a | refs/heads/master | 2023-06-28T02:36:21.634149 | 2021-07-28T10:57:44 | 2021-07-28T10:57:44 | 388,875,012 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import cv2
# We point OpenCV's Cascade classifier function to where our classifier (XML file format) is stored.
face_cascade = cv2.CascadeClassifier(
'Haarcascades/haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('Haarcascades/haarcascade_eye.xml')
# Defining a function... | UTF-8 | Python | false | false | 1,611 | py | 11 | face_and_eye_detection_using_webcam.py | 7 | 0.655493 | 0.633768 | 0 | 39 | 40.307692 | 100 |
jumbobumbo/flask-db | 8,392,366,096,980 | 03bad21d92e87a1be5cc6f509bad1f8c3aa6e79e | 2919931ff5c7aa5ecedb45f6ee66bebe83f6b5b0 | /app/common/hashing.py | 67e23c5dd6d17bfda9dc03f3ad4c5ef90facf08a | [] | no_license | https://github.com/jumbobumbo/flask-db | 5fff9298299ab8fcb00ff1b79df25eec83f957f0 | 8f0eea2f8bb9a6efc9631e2708d2fcd0630e3ac3 | refs/heads/main | 2023-06-21T20:25:23.791961 | 2021-07-20T17:03:23 | 2021-07-20T17:03:23 | 330,432,029 | 1 | 0 | null | false | 2021-07-20T17:03:24 | 2021-01-17T16:14:38 | 2021-07-20T00:10:12 | 2021-07-20T17:03:23 | 100 | 0 | 0 | 0 | Python | false | false | """Password hasher and validation functions"""
from bcrypt import hashpw, checkpw, gensalt
def hasher(string: str) -> str:
"""Hashes a string with a salty salt, default encoding of utf-8 (we live in a modern world)
Args:
string (str): The string to hash.
Returns:
str: The hashed string
... | UTF-8 | Python | false | false | 822 | py | 29 | hashing.py | 20 | 0.664234 | 0.656934 | 0 | 29 | 27.344828 | 107 |
jpdickert/CTI110 | 9,216,999,834,086 | 4249c20ee7acbb4a8122545c7f79f7c3f1e02d65 | fc4ac2a12243c78c27c0a0a87ec614ded9658055 | /P2T1_SalesPrediction_DickertJason.py | 2a60dc9f1d57593387f80af58379d1a06040086a | [] | no_license | https://github.com/jpdickert/CTI110 | 238dd58a48f99f926226b26141ddf8fe2db599d5 | 168e0915b198e1be20db29ca3ba4c5b0ef85c2e4 | refs/heads/master | 2020-03-20T20:46:40.693607 | 2018-07-21T19:10:57 | 2018-07-21T19:10:57 | 137,705,893 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # CTI-110
# P2T1 - Sales Prediction
# Jason Dickert
# 07 June 2018
#
print('Enter your projected amount of total sales.')
number = float(input("Projected amount of total sales: $"))
print('Your projected amount of total sales is $', (number), '.')
print('Your projected annual profit will be about $', (number*.2... | UTF-8 | Python | false | false | 330 | py | 22 | P2T1_SalesPrediction_DickertJason.py | 18 | 0.678788 | 0.639394 | 0 | 9 | 34.666667 | 72 |
bhowiebkr/simple-node-editor | 8,383,776,199,442 | 376b4589a26ac4614fdd9e69e2668aa4bf726b77 | c1f4aaaed63053c380ee0af63ee3cd929575698c | /node_editor/gui/port.py | 2db842d8889e0c4720a8e6d3e8cfa2a4421b20f0 | [
"MIT"
] | permissive | https://github.com/bhowiebkr/simple-node-editor | 635199ca0c77b5948463bd590a53eada4f57e45f | 845c1f790005496c412769864809ab790f06bfea | refs/heads/master | 2023-04-04T23:25:27.365081 | 2023-03-19T08:46:11 | 2023-03-19T08:46:11 | 219,095,033 | 11 | 5 | MIT | false | 2023-04-05T22:23:00 | 2019-11-02T02:54:25 | 2023-04-04T14:55:37 | 2023-04-05T22:23:00 | 219 | 78 | 27 | 0 | Python | false | false | from PySide6 import QtCore, QtGui, QtWidgets
class Port(QtWidgets.QGraphicsPathItem):
"""A graphics item representing an input or output port for a node in a node-based graphical user interface.
Attributes:
radius_ (int): The radius of the port circle.
margin (int): The margin between the por... | UTF-8 | Python | false | false | 4,373 | py | 10 | port.py | 9 | 0.623828 | 0.621999 | 0 | 123 | 34.552846 | 144 |
dabbott/scmap | 10,969,346,480,589 | eeff4707d5ffccd364989810a4e4be402b9d45e9 | 2d83f7d2ca5359debf48a64faff2ce90798f3916 | /scmap/chk.py | 297711632f4e333c1d1443ef46e4e6091341d6c3 | [] | no_license | https://github.com/dabbott/scmap | d92377ea9349972f1fcb628e3d3b76b73bd37726 | b5559fa6abd6e0bf06b44d9d42b3c982d9e2a580 | refs/heads/master | 2021-01-20T05:47:23.733656 | 2010-07-28T02:23:24 | 2010-07-28T02:23:24 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import struct
import mpq
import StringIO
tilesets = {
0: "badlands",
1: "platform",
2: "install",
3: "ashworld",
4: "jungle",
5: "desert",
6: "ice",
7: "twilight",
}
tileset_numbers = dict((v,k) for k,v in tilesets.iteritems())
def load(filename):
mf = StringIO.StringIO(mpq.Archiv... | UTF-8 | Python | false | false | 1,478 | py | 27 | chk.py | 25 | 0.558187 | 0.540595 | 0 | 51 | 27.882353 | 166 |
kchennen/metadome | 6,365,141,556,611 | 8d48f4665fb2f6b642eb727f8a326b334695fcd5 | 140bf2d656191194f4f1b0c81e66e64b43de712a | /metadome/factory.py | 6d61244e5023893fd48bbce66f1f0cc741675265 | [
"MIT"
] | permissive | https://github.com/kchennen/metadome | abf8e33b5cea20ca6d5bff07674211000dcc8714 | 2b4448b33cbc5512b56f5aaa7453d0a255ee1628 | refs/heads/master | 2023-03-27T01:28:30.287401 | 2019-08-22T14:19:10 | 2019-08-22T14:19:10 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
from flask import Flask
import flask_jsglue
from metadome.domain.services.mail.mail import mail
from metadome.default_settings import MAIL_SERVER
from celery import Celery
_log = logging.getLogger(__name__)
def create_app(settings=None):
_log.info("Creating flask app")
app = Flask(__name__, s... | UTF-8 | Python | false | false | 2,985 | py | 69 | factory.py | 61 | 0.660972 | 0.660972 | 0 | 102 | 28.264706 | 102 |
smaystr/rails_reactor | 5,961,414,613,561 | f5ba8af8fa844fd5777d41bfcd1239962866564b | 1f0831db24ae2772d4944faf05289599bb37aca7 | /linear_models/04/models/logistic_regression.py | b00f306c7e7a4eaba97eaa03a670283c1a66ebdf | [] | no_license | https://github.com/smaystr/rails_reactor | 2123f39ae97f38acb647363979fe4a09b896670e | 69c8aac5860527768b4a8b7bce027b9dea6b1989 | refs/heads/master | 2022-08-19T05:35:21.535933 | 2019-08-28T12:46:22 | 2019-08-28T12:46:22 | 189,264,026 | 1 | 0 | null | false | 2022-07-29T22:34:56 | 2019-05-29T16:47:08 | 2019-08-28T13:03:28 | 2022-07-29T22:34:53 | 76,416 | 1 | 0 | 7 | Jupyter Notebook | false | false | import numpy as np
from typing import List
from utils.gradient_descent import gradient_descent
from utils.classification_metrics import get_metric
from utils.dataset_processing import add_ones_column
np.random.seed(42)
class LogisticReg:
def __init__(
self,
*,
fit_intercept: bool = True,... | UTF-8 | Python | false | false | 2,310 | py | 419 | logistic_regression.py | 311 | 0.592208 | 0.585714 | 0 | 75 | 29.8 | 95 |
Shrumdog/pubg | 14,551,349,243,526 | 84b1bf4fcd4d8547dd6bbfdc03ab82d78348f798 | b457d19ab546f3ddd3a3647d0cd071ce42c55ac8 | /app/bin/something.py | 4ad31bc8fce91b2208e935b3c67757c386a5041a | [] | no_license | https://github.com/Shrumdog/pubg | 879348e5aa481a9f554b74db5b8fc2b942e2f645 | 82ca209646f63aef60191c7296e9546c4ac18122 | refs/heads/master | 2020-12-03T00:39:59.381423 | 2017-07-03T06:24:40 | 2017-07-03T06:24:40 | 96,059,622 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import PIL
from PIL import ImageGrab
from PIL import Image
import sys
import subprocess
import numpy
import time
import datetime
PATH = "G:\\AtomProjects\\dev\\pubg\\data\\inbound\\gameplay\\"
TIME = time.time()
game_time = datetime.datetime.fromtimestamp(time.time()).strftime('%Y%m%d%H%M')
print(PATH)
#automate scree... | UTF-8 | Python | false | false | 1,748 | py | 3 | something.py | 2 | 0.622998 | 0.621854 | 0 | 78 | 21.410256 | 79 |
lololololoki/dataprocess_pansharpening | 12,094,627,948,728 | 4894a5e094ba875a3fddf9f2757548d3338caf0a | 640f303bf5a72a28a797f4f49523b5b897a2310c | /preprocessing_classify/tifClassify.py | da14d37230e098d2b7c20009564394c31a4b030b | [] | no_license | https://github.com/lololololoki/dataprocess_pansharpening | 9abf8ca9a5c2e5f6460a192ebf0658603cc548c3 | 0ca44bceac061477ddb479ca788d6a9df303b1a4 | refs/heads/master | 2020-11-30T09:46:55.232449 | 2019-12-27T04:08:02 | 2019-12-27T04:08:02 | 230,368,371 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-\
#分类存放 rural suburban urban .tif文件
import os
import shutil
ruralNum = [7, 22, 23, 24, 26, 28, 29, 31, 38, 48]
suburbanNum = [1, 2, 3, 4, 6, 8, 15, 20, 25, 27]
urbanNum = [5, 10, 11, 12, 13, 14, 16, 17, 18, 19]
fileType = ['.tif', '_boxes', '_points']
def tifClassify(srcDir, dstDir)... | UTF-8 | Python | false | false | 1,590 | py | 20 | tifClassify.py | 18 | 0.513995 | 0.475827 | 0 | 56 | 26.107143 | 138 |
Aasthaengg/IBMdataset | 1,382,979,475,589 | c52ca2a39106b9a0250d0cb3fdbfe1b331b7b777 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03609/s179671047.py | bbe358a226e3273ffa46b2fc0d578499bf906373 | [] | no_license | https://github.com/Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | X, t = map(int, input().split())
print(0 if X <= t else X-t) | UTF-8 | Python | false | false | 60 | py | 202,060 | s179671047.py | 202,055 | 0.566667 | 0.55 | 0 | 2 | 29.5 | 32 |
mariemsmaoui/kms | 1,735,166,802,858 | 03b72a74f81e84b54f7bc41f65ced26d9e6a47a0 | 960b65f627df15e893a2b7e95e835fba7e0a8df2 | /kms/migrations/0017_auto_20210525_1241.py | 98856a45dca027a8ba1b893c11075a25a7923198 | [] | no_license | https://github.com/mariemsmaoui/kms | 22c7c6b04c76b419660297b2e90fa1b61b9e388c | bfc94bbc1c547fde446d28e2978cf4a4dfd65860 | refs/heads/master | 2023-05-05T06:18:02.451747 | 2021-05-27T09:01:41 | 2021-05-27T09:01:41 | 371,308,865 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 3.1.7 on 2021-05-25 10:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('kms', '0016_auto_20210525_1238'),
]
operations = [
migrations.AlterField(
model_name='responsab... | UTF-8 | Python | false | false | 505 | py | 16 | 0017_auto_20210525_1241.py | 16 | 0.635644 | 0.574257 | 0 | 19 | 25.578947 | 133 |
bojan211/PA-svee | 4,535,485,475,337 | 55a46ce2b493f9a9600954e0690555a22f5621cf | 1faf0781d9129c04568743cef7e23ade5cef1bfd | /vezba05-rad/vezba05-rad/class_example.py | 8c4f4f75de16caa7649fc317b4ce5a8fd31c8151 | [] | no_license | https://github.com/bojan211/PA-svee | cd16fd5b938b27b9e229296a57ce7dbc8c89ba79 | 7b9f0c40faa87468b9c00451fcb96ea0855bcb93 | refs/heads/master | 2020-03-18T03:40:17.501206 | 2018-05-21T09:55:22 | 2018-05-21T09:55:22 | 134,250,660 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Node:
"""
Tree node: left child, right child and data
"""
def __init__(self, l = None, r = None, d = None, p = None):
"""
Node constructor
@param A node data object
"""
self.left = l
self.right = r
self.data = d
self.parrent = p
cla... | UTF-8 | Python | false | false | 1,128 | py | 12 | class_example.py | 10 | 0.444149 | 0.429965 | 0 | 52 | 20.711538 | 63 |
raj174/Assistive_Robot_with_EMG-ROS | 3,015,067,084,194 | dbef829f8cfd5a2f395a3477aa6d1702aff60ab3 | c89fb572dc76983eb6d14a5cd01554efa3350c91 | /scripts/ik.py | 1b8f0b3605668157b81ea77203b88dd8b0d81c6d | [] | no_license | https://github.com/raj174/Assistive_Robot_with_EMG-ROS | a19d971db3c16ba40da7f41958597eb7f9dd788c | 92b4600a1617a48c402c3d1ca350d27447e6b08b | refs/heads/master | 2021-03-31T03:51:51.361250 | 2018-05-18T15:21:11 | 2018-05-18T15:21:11 | 124,863,603 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013-2017, Rethink Robotics Inc.
#
# 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 ... | UTF-8 | Python | false | false | 5,739 | py | 13 | ik.py | 13 | 0.624499 | 0.567346 | 0 | 169 | 32.95858 | 125 |
valterUo/MultiCategory-backend-py | 1,563,368,103,755 | c0eb1c16380dfd72cae31efe1e63c6c43893c067 | 7a28fb508e3ddabe6f2cb96f93702864b16189b8 | /src/multi_model_join/file_path_functions.py | b835c813ef81011a6247b234eb5437ca94a1f022 | [] | no_license | https://github.com/valterUo/MultiCategory-backend-py | e8dd902d1d4ccb95863b1e4b39c231e03683213f | fe6a97f28ab02d9bab3c19baf2b6cb7adb2bbf34 | refs/heads/master | 2023-02-02T12:07:05.324629 | 2020-12-18T17:37:41 | 2020-12-18T17:37:41 | 258,447,726 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
def parse_file_path(old_path, new_file_name):
dir_name = os.path.dirname(old_path)
# base = os.path.basename(old_path)
# filename = os.path.splitext(base)[0]
file_extension = os.path.splitext(old_path)[1]
return dir_name + "//" + new_file_name + file_extension
def par... | UTF-8 | Python | false | false | 434 | py | 224 | file_path_functions.py | 201 | 0.635945 | 0.629032 | 0 | 13 | 32.461538 | 63 |
gmcclur3/PyCrashCourse | 17,248,588,678,375 | 06f6586e519defab10b4d8acb7cb8c326c843756 | 0081d06443d1e43bd30cf68fd6905b9e6f9f44bf | /Chapter_5/magic_number.py | 6fa5790097a0c939e3fdc85c37267576427362db | [] | no_license | https://github.com/gmcclur3/PyCrashCourse | 166e86cbb1e9120ca9817a9cf27f336c29a77841 | 7b5037e2140c667c49fea099778cf0550de1d7b7 | refs/heads/master | 2021-01-10T10:48:24.291033 | 2016-02-22T22:20:00 | 2016-02-22T22:20:00 | 51,034,982 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Gary McClure 2016-02-08
answer = 17
if answer != 42:
print("That is not the correct answer, please try again.")
| UTF-8 | Python | false | false | 120 | py | 33 | magic_number.py | 32 | 0.675 | 0.575 | 0 | 6 | 19 | 62 |
ypwhs/python | 4,853,313,053,192 | 60ea236d4748615361ead00b542534a9f45d3d7b | 01a38a37d064374498a3f502da00acd97a6fdb6f | /others/coursera_srt.py | 501c48522fb8fa33e604dc41722050204abdc7d1 | [] | no_license | https://github.com/ypwhs/python | d0e91a936d73f6937b20d1663dda2274330d82c5 | e8e87b741e17ff90d729ab11088d22159d3b4e94 | refs/heads/master | 2019-04-12T12:59:32.540385 | 2016-10-20T16:24:50 | 2016-10-20T16:24:50 | 32,674,034 | 5 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding: utf-8
__author__ = 'ypw'
import os
from_ = '/Users/ypw/Desktop/DeepLearning/coursera/machine-learning'
for root, dirnames, filenames in os.walk(from_):
for filename in filenames:
if filename.find('DS_Store') != -1:
os.remove(root + '/' + filename)
if filename.find('zh-CN') ... | UTF-8 | Python | false | false | 672 | py | 65 | coursera_srt.py | 61 | 0.513393 | 0.505952 | 0 | 18 | 36.333333 | 93 |
akshaybabu09/fetch-html-content | 5,617,817,235,805 | 6ed4fc5779a7af27fcf1eaad9a318215bf38c436 | 82da23b536b27e6259dde79a11cc82846399cd24 | /api/fetch_html/views.py | 4749091c4bf42d872dd1f061f0f94a123eae7e93 | [] | no_license | https://github.com/akshaybabu09/fetch-html-content | 8f02a8f7bc4c8e5e9d9f5de46017a1954099e008 | afe36fce84676c1a66c6f915b03f255fd4d0931d | refs/heads/master | 2022-02-13T18:46:18.620690 | 2019-12-13T11:57:30 | 2019-12-13T11:57:30 | 227,527,530 | 0 | 0 | null | false | 2022-01-21T20:11:11 | 2019-12-12T05:31:13 | 2019-12-13T11:57:33 | 2022-01-21T20:11:10 | 15 | 0 | 0 | 5 | Python | false | false | from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.status import *
from fetch_html.constants import *
from fetch_html.libs.fetch_html_page import fetch_html_page
from fetch_html.services import check_for_url_email
class FetchHTMLContentAPI(APIView):
def pos... | UTF-8 | Python | false | false | 963 | py | 11 | views.py | 8 | 0.671859 | 0.656282 | 0 | 27 | 34.666667 | 87 |
mcXrd/netwo | 11,355,893,563,925 | 6e6b2416e5252e714c748849d132e46134f6c70c | 5a836faaca8453fd1527599f952cb3f6979618fc | /main/main.py | d1a49f9f4ce2854161e73b09a30626feb141493e | [] | no_license | https://github.com/mcXrd/netwo | 47f5e08ab013088eff53058a74bd7e8da5f20778 | c97aeb09cf9e05f1b137ba326ef2fdc3e50e8d9d | refs/heads/NTW1 | 2020-03-12T23:39:35.227141 | 2018-04-28T14:10:01 | 2018-04-28T15:21:06 | 130,870,488 | 0 | 0 | null | false | 2018-05-08T19:08:10 | 2018-04-24T14:51:40 | 2018-04-28T15:21:23 | 2018-05-08T19:06:58 | 20 | 0 | 0 | 5 | Python | false | null | import settings
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
from urls import add_urls
from pyramid.renderers import JSONP
if __name__ == '__main__':
config = Configurator()
config.include('pyramid_rpc.jsonrpc')
config.add_rend... | UTF-8 | Python | false | false | 552 | py | 13 | main.py | 10 | 0.711957 | 0.697464 | 0 | 17 | 31.470588 | 80 |
ArsPro13/Movement-of-the-body-thrown-at-the-angle-to-the-horizon | 13,838,384,663,175 | 273f8d9d2c84641d7998a5bde00c5cc5cdc4f296 | 730670d69d4e83f1f1ec69f4f6484466a29fa774 | /main.py | d3b23d4752a9853ad92d394e1074708f7eaaa378 | [] | no_license | https://github.com/ArsPro13/Movement-of-the-body-thrown-at-the-angle-to-the-horizon | 2dc58fd7cdb4471208a20084678b5f596c6dd908 | 6afa4a1eb44e23c580f8d7e921adf872b424f33e | refs/heads/master | 2023-06-25T10:14:43.745884 | 2021-04-26T19:41:46 | 2021-04-26T19:41:46 | 339,555,057 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tkinter import *
from math import sin, cos, pi, asin, acos, atan, sqrt, tan
import datetime
from tkinter import messagebox as mb
from tkinter import filedialog as fd
root = Tk()
root.title("Движение тела, брошенного под углом к горизонту")
root.resizable(width=False, height=False)
light_theme = True
label_bg_co... | UTF-8 | Python | false | false | 188,176 | py | 7 | main.py | 1 | 0.475979 | 0.417822 | 0 | 4,996 | 34.281225 | 189 |
DanielHry/Python | 17,386,027,621,700 | 0a1344bba3efb6c399d75b3d2abee67a0e4b26ee | a76874216533ad00957938c40bf1bbc32d969dfb | /20 - Coin Flip Simulation/Coin_Flip_Simulation.py | f4fca538d9f5b27b7fc852b6ad872953550f1dea | [] | no_license | https://github.com/DanielHry/Python | 039df8639ee2f97000114c120756632f34f9680b | 6c5e37c207250bd89f67a499135e8eb987578823 | refs/heads/master | 2022-07-13T03:47:49.849202 | 2020-05-16T13:35:18 | 2020-05-16T13:35:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 2020
@author: Daniel Hryniewski
Coin Flip Simulation - Write some code that simulates flipping a single coin however many times the user decides.
The code should record the outcomes and count the number of tails and heads.
"""
import random
def choice(... | UTF-8 | Python | false | false | 1,165 | py | 29 | Coin_Flip_Simulation.py | 28 | 0.466094 | 0.448069 | 0 | 60 | 17.45 | 113 |
henryeherman/elixys | 13,950,053,816,524 | 267a767ebe29ace5e76619abdc53f4754cb2dd7d | 96265682e3dfab6207be5780ef18279d6fa050c1 | /server/hardware/fakeplc/CoolingThread.py | e46d2f1be135e94d07c873cd866389f736d538e4 | [] | no_license | https://github.com/henryeherman/elixys | 1b152b8b82438c5749bfa377563e2aef362ba779 | c6954ca0fff935ce1eb8154744f6307743765dc5 | refs/heads/master | 2021-01-17T21:49:27.294996 | 2014-02-07T21:31:20 | 2014-02-07T21:31:20 | 1,531,843 | 1 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | """ CoolingThread.py
Cooling thread that adjusts the temperature of the reactors over time"""
### Imports
import threading
import time
class CoolingThread(threading.Thread):
def __init__(self):
"""Heater thread class constructor"""
super(CoolingThread, self).__init__()
self.__pStopEvent =... | UTF-8 | Python | false | false | 3,191 | py | 275 | CoolingThread.py | 126 | 0.616421 | 0.587277 | 0 | 75 | 41.546667 | 158 |
mashelll/bioinformatics | 6,176,162,998,979 | 4d67482631bf708b8a87ca949ffd8fba337e1bcf | 7b4ad04d91003cddb40c045d5e927fe1263ec5ac | /3.py | 4fdcd4de7ca562f1f0c4f45512f9534dfa747c67 | [] | no_license | https://github.com/mashelll/bioinformatics | 1b0574749171216582361fa6f84cf2dd681e950a | 48787787865bd2e2cdd4cd209c02adb335963920 | refs/heads/master | 2020-09-23T05:00:14.139996 | 2019-12-02T15:42:46 | 2019-12-02T15:42:46 | 225,409,800 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | with open('/home/masha/Загрузки/rosalind_ba1h.txt', 'r') as f:
Pattern = str(f.readline())[:-1]
Text = str(f.readline())
d = int(f.readline())
def HammingDistance(Pattern, substring):
k = len(Pattern)
if k != len(substring):
return
d = 0
for i in range(k):
if Pattern[i] != ... | UTF-8 | Python | false | false | 725 | py | 21 | 3.py | 21 | 0.566996 | 0.559944 | 0 | 29 | 23.413793 | 62 |
renzon/appengineepython | 3,831,110,837,314 | 7aaee796ac3084288e16e46d474f2742092fae27 | 6b837ccc55a4d8e4c5d0b96f8219343d825374e5 | /backend/appengine/routes/vendas/home.py | f717c6d26b6b227157c5166404920cede871cd64 | [
"MIT"
] | permissive | https://github.com/renzon/appengineepython | 2f2d88d3d5097c3e76cd22e465c6dd51b6d396f9 | ed156055c1d5e023a6b775ad448a85bf037aea8d | refs/heads/master | 2021-01-10T19:09:06.485143 | 2015-01-22T01:34:38 | 2015-01-22T01:34:38 | 22,219,180 | 3 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from config.template_middleware import TemplateResponse
from tekton import router
from gaecookie.decorator import no_csrf
from venda_app import venda_facade
from routes.vendas import new, edit
from tekton.gae.middleware.redirect import Red... | UTF-8 | Python | false | false | 1,150 | py | 100 | home.py | 62 | 0.698261 | 0.697391 | 0 | 33 | 33.818182 | 79 |
henryjahja/python-algorithms | 11,811,160,068,647 | bf7dbef07ef542d325f65704c593408489870519 | 0ec1f27d2b5a86a29d686deccb3789ee1146a5b1 | /hackerrank/diagonalDifference.py | 8f5745ab33db766212f3df31dae64a636f364417 | [] | no_license | https://github.com/henryjahja/python-algorithms | 0220dd6b9c92eca6ba369a24e60d809a24d0bbd8 | 8378c174d2b58399103b162a357e096b73c3e171 | refs/heads/master | 2020-07-08T10:30:44.934092 | 2017-01-02T23:38:37 | 2017-01-02T23:38:37 | 67,309,796 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''by vatsalchanana
Given a square matrix of size NxN, calculate the absolute difference between the sums of its diagonals.
'''
#!/bin/python3
import sys
n = int(input().strip())
a = []
for a_i in range(n):
a_t = [int(a_temp) for a_temp in input().strip().split(' ')]
a.append(a_t)
primaryDiagonal = 0
second... | UTF-8 | Python | false | false | 510 | py | 49 | diagonalDifference.py | 48 | 0.647059 | 0.633333 | 0 | 24 | 20.25 | 103 |
rashmisn96/PythonQ | 11,484,742,573,667 | 7d1a72bd9cd56c10f6021a9bc67cfdec3c9b6c86 | a46c5a6ac384ddc52edd46bfbbd1d3c2e9ee0a6d | /basics/tryexcepttwo.py | 1602515f1edb8c6ee37d1fd9f94437492f3768b1 | [] | no_license | https://github.com/rashmisn96/PythonQ | 19ffa84e5af7dd86e212c96a601ff646e5b04832 | ecf7e3b3b5530837482e27ad2594fc7a5e622fb9 | refs/heads/master | 2022-12-29T02:18:17.048908 | 2020-10-15T16:20:23 | 2020-10-15T16:20:23 | 281,990,079 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | x = input('Enter Days: ')
y = input('Enter Rate: ')
try:
print(int(x))
print(int(y))
except:
print('Please enter numeric value')
| UTF-8 | Python | false | false | 149 | py | 8 | tryexcepttwo.py | 8 | 0.57047 | 0.57047 | 0 | 7 | 19.142857 | 39 |
AlterixAsi/StellarisAutoUpdater | 3,650,722,233,758 | fb5c0cf031f2d2c96493d02d8c494433f60e158f | 25fb8bf7bd3a477beba5891e2a0d2c24b47bd4db | /moves.py | 0b13241b7e618e6995b9889cf96653176989439c | [] | no_license | https://github.com/AlterixAsi/StellarisAutoUpdater | d483e223462f20579f8d436675afa96ea235c6f9 | b6e77d70d71f2c507d70bfda27cf6aeeda9a7a11 | refs/heads/master | 2020-04-13T00:40:12.651561 | 2018-12-23T00:50:59 | 2018-12-23T00:50:59 | 162,851,621 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import shutil
import os
import zipfile
filename = "924990631"
zipf = ""
tempdir = os.listdir("temp/"+filename)
print(tempdir)
z = zipfile.ZipFile("temp/"+filename+"/"+tempdir[0])
z.extract("descriptor.mod","modfile")
z.close()
os.rename("modfile/"+"descriptor.mod","modfile/"+filename+".mod")
shutil.move("tem... | UTF-8 | Python | false | false | 340 | py | 12 | moves.py | 9 | 0.691176 | 0.661765 | 0 | 12 | 26.5 | 65 |
dominikus1993/AlgorithmsAndDataStructFSharp | 7,155,415,555,547 | cbc62d59323bda6403ec62b78dbb987cffa92494 | 9671b2217580be77ed42c1a5d08fc3babf2cf0f9 | /Python/ProjectEuler3.py | 886d7477e726b14cfcb14bc834a194f5282aaafd | [] | no_license | https://github.com/dominikus1993/AlgorithmsAndDataStructFSharp | aa99caa7713758b826d0b9fa86734ac61c03bd9e | 58b109cd21bf5dda7e8a63f9b478c79f36555291 | refs/heads/master | 2020-12-24T06:58:26.212989 | 2016-06-10T08:15:37 | 2016-06-10T08:15:37 | 38,211,612 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
def findFactor(number):
upperBound = int(math.sqrt(number)) + 1
return [x for x in range(2,upperBound) if number % x == 0]
def isPrime(number):
return len(findFactor(number)) == 0
def filterList(number):
upperBound = int(math.sqrt(number)) + 1
list = range(2,upperBound)
return ... | UTF-8 | Python | false | false | 426 | py | 198 | ProjectEuler3.py | 58 | 0.673709 | 0.629108 | 0 | 15 | 27.4 | 83 |
hhongjoon/TIL | 10,531,259,843,040 | c9b039ffe3aeee9c9a45525bb292093e93694c63 | 9c968f7cdf390f8417912519b53f1b7f6ea8b7e8 | /HJ_AL/BAEK/B1094_막대기.py | 2b10e494daa8a1846d3555698c9c8cecf47c0382 | [] | no_license | https://github.com/hhongjoon/TIL | aa33ce2973552a0baa0e0da5bd7d20824fd2e322 | a33b20af15d3f671ea7c7b2855291e50a9036c1c | refs/heads/master | 2021-08-07T17:33:39.722880 | 2020-04-25T08:11:02 | 2020-04-25T08:11:02 | 162,099,245 | 4 | 0 | null | false | 2019-10-30T09:06:21 | 2018-12-17T08:34:07 | 2019-08-10T17:24:38 | 2019-10-30T09:06:20 | 52,347 | 2 | 0 | 1 | Jupyter Notebook | false | false | #64cm
X = int(input())
sticks=[64]
while True:
if sum(sticks) > X:
minstick = min(sticks)
sticks.remove(minstick)
if minstick/2 + sum(sticks) >= X:
sticks.append(minstick/2)
else:
sticks.append(minstick / 2)
sticks.append(minstick/2)
if sum(sti... | UTF-8 | Python | false | false | 378 | py | 427 | B1094_막대기.py | 317 | 0.52381 | 0.502646 | 0 | 15 | 23.8 | 41 |
spdkh/quera | 12,927,851,596,550 | 17b5b54b296502349f0399625b24ee03af11db64 | f23554b3dd39c2673d2baefbce32423db311233b | /help to copy.py | 179231aeb683b81557823978844d58880a8683ea | [] | no_license | https://github.com/spdkh/quera | be97a81d403aa6c5d44d9dcf1a9a804f0e036a40 | b0e2359f1d2ca334405f8f91153cdca73e01f2be | refs/heads/master | 2022-11-22T14:36:23.709030 | 2020-07-16T14:33:17 | 2020-07-16T14:33:17 | 280,170,779 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | n,s = map(str, input().split())
n = int(n)
print( n * 'copy of ' + s)
| UTF-8 | Python | false | false | 70 | py | 148 | help to copy.py | 148 | 0.514286 | 0.514286 | 0 | 3 | 22.333333 | 31 |
open-mmlab/mmagic | 14,078,902,819,402 | ba713b91325870a0570aa31c46f2eab9f25a25f3 | af101b467134e10270bb72d02f41f07daa7f57d8 | /mmagic/models/losses/loss_comps/clip_loss_comps.py | 4ae48c9bc973d4ae49eca61f16fb16607c0fd1d7 | [
"Apache-2.0"
] | permissive | https://github.com/open-mmlab/mmagic | 4d864853417db300de4dfe7e83ce380fd1557a23 | a382f143c0fd20d227e1e5524831ba26a568190d | refs/heads/main | 2023-08-31T14:40:24.936423 | 2023-08-30T05:05:56 | 2023-08-30T05:05:56 | 203,999,962 | 1,370 | 192 | Apache-2.0 | false | 2023-09-14T11:39:18 | 2019-08-23T13:04:29 | 2023-09-14T11:22:31 | 2023-09-14T11:39:17 | 26,511 | 5,729 | 962 | 22 | Jupyter Notebook | false | false | # Copyright (c) OpenMMLab. All rights reserved.
from typing import Optional
import torch
import torch.nn as nn
from mmagic.registry import MODELS
from ..clip_loss import CLIPLossModel
@MODELS.register_module()
class CLIPLossComps(nn.Module):
"""Clip loss. In styleclip, this loss is used to optimize the latent c... | UTF-8 | Python | false | false | 4,124 | py | 1,249 | clip_loss_comps.py | 952 | 0.591174 | 0.589476 | 0 | 106 | 37.90566 | 79 |
JackAndrewG/Python_Project | 9,629,316,693,163 | 427cac3b8a2c3df4786a301d30bd1b52cdc19db7 | 648789f42051eb6383407b135c0f38ffc0387327 | /app1/migrations/0001_initial.py | 28668c66e3996f58af1d2c69d8621999e1d9e1cb | [] | no_license | https://github.com/JackAndrewG/Python_Project | 773f432844155238aa66385b73b8be5da7ddd103 | 4eaa85095dd8dee9b04519c78c0069e06087cf5d | refs/heads/master | 2021-07-22T01:44:30.045778 | 2019-12-08T04:23:58 | 2019-12-08T04:23:58 | 186,859,209 | 1 | 0 | null | false | 2019-07-01T00:10:41 | 2019-05-15T15:54:53 | 2019-06-17T15:17:22 | 2019-06-30T23:57:23 | 13,693 | 0 | 0 | 0 | CSS | false | false | # Generated by Django 2.2.1 on 2019-05-20 14:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | UTF-8 | Python | false | false | 3,142 | py | 16 | 0001_initial.py | 8 | 0.598027 | 0.577658 | 0 | 62 | 49.677419 | 139 |
loyess/Note | 7,713,761,288,172 | 957a2a7d2dcfa033b7f23cbbea01cf9ccc17c2a2 | 55fc63ba38c594c0046a9a2e239696726923afbc | /asyncio/011_同一线程的事件循环.py | 8481df3f0e48eb1c7be181c57f436062627c5433 | [] | no_license | https://github.com/loyess/Note | 7eca2bf607f7403b762d98379c121c29803f65d2 | aaa95c4acdd23be95256138c56c286600fe45e7b | refs/heads/master | 2020-04-26T09:44:53.936377 | 2019-03-02T15:50:55 | 2019-03-02T15:50:55 | 173,466,392 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import asyncio
import time
"""
在当前线程中创建一个事件循环(不启用,单纯获取标识),开启一个新的线程,在新的线程中
启动事件循环。在当前线程依据事件循环标识,可以向事件中添加协程对象。当前线程不会由于事件循环而阻塞了。
上面在一个线程中执行的事件循环,只有我们主动关闭事件close,事件循环才会结束,会阻塞。
"""
async def func1(num):
print(num, 'before---func1----')
await asyncio.sleep(num)
return "recv num %s" % num
if __name__ == "__... | UTF-8 | Python | false | false | 1,002 | py | 29 | 011_同一线程的事件循环.py | 28 | 0.652174 | 0.633152 | 0 | 36 | 19.444444 | 51 |
buildchange/ISAC-SIMO_Django | 1,520,418,423,561 | 287ea18cf608720d54114bdabf8113ca998e3a53 | 45760f48bf8630e059e6a676453abf82e04a4284 | /projects/migrations/0003_projects_detect_model.py | 0ba131412ab5369e1776642496d499e20fa9ab64 | [
"Apache-2.0",
"LicenseRef-scancode-dco-1.1"
] | permissive | https://github.com/buildchange/ISAC-SIMO_Django | c7bb3cece9b19b8afdd6052a0489122f56c54d33 | 985463bfe70d386fffc254edc9eafbdc36c8790e | refs/heads/master | 2023-08-14T20:43:19.293109 | 2023-07-12T03:01:43 | 2023-07-12T03:01:43 | 250,432,048 | 0 | 0 | Apache-2.0 | false | 2023-07-25T21:07:23 | 2020-03-27T03:34:49 | 2022-01-04T10:43:03 | 2023-07-25T21:07:22 | 50,003 | 0 | 0 | 2 | JavaScript | false | false | # Generated by Django 2.0 on 2020-04-17 04:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0002_auto_20200407_1145'),
]
operations = [
migrations.AddField(
model_name='projects',
name='detect_model... | UTF-8 | Python | false | false | 399 | py | 158 | 0003_projects_detect_model.py | 89 | 0.593985 | 0.518797 | 0 | 18 | 21.166667 | 58 |
iamshivamgoswami/Random-DSA-Questions | 15,590,731,299,476 | 7c8740f977c45ef8222ffbd54f692fda12ee7e9e | 80afa26ba73b53f38e3fc21bf395030762fe8981 | /find lonely pixel.py | f2e93031c1dcaabce8f579cecfd949caa7366bab | [] | no_license | https://github.com/iamshivamgoswami/Random-DSA-Questions | 45b402063dbd2e31da2eee7590b6991aa624637d | e36250d08cf0de59cd0a59b4f3293e55793b1a6f | refs/heads/main | 2023-07-15T15:48:36.363321 | 2021-08-26T03:40:47 | 2021-08-26T03:40:47 | 392,702,686 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def findLonelyPixel(self, l: List[List[str]]) -> int:
def dfs(i, j):
flag = False
for row in range(len(l)):
if row == i:
continue
if l[row][j] == "B":
flag=True
for col in range(len(l[... | UTF-8 | Python | false | false | 668 | py | 118 | find lonely pixel.py | 118 | 0.36976 | 0.362275 | 0 | 23 | 27.956522 | 57 |
nikasha89/AIA | 18,537,078,851,176 | 1a627f0cea3cdb9d2028f554b1df1bade696c9fe | 10e00eea62ac14d5b2631e724b0978590b653a8b | /Entregable 2/arbolesDeDecision.py | da50996f3b0599f7c29f0267d540f1304fbe1b1e | [] | no_license | https://github.com/nikasha89/AIA | e20243055d495973de29e811edd0a53f29c947d5 | 65b00b604d06b1fd3c0cd0f32c238ce67e1cda13 | refs/heads/master | 2020-05-23T07:49:13.211836 | 2017-04-02T11:51:42 | 2017-04-02T11:51:42 | 80,447,347 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sklearn.tree import DecisionTreeClassifier, export_graphviz
import clasificationSystem
import regresionLogistica
from sklearn.cross_validation import train_test_split
X_names = clasificationSystem.target_names
# Obtenemos datos del entrenamiento:
X_train, X_test, y_train, y_test = train_test_split(clasificationSy... | UTF-8 | Python | false | false | 2,195 | py | 16 | arbolesDeDecision.py | 13 | 0.533638 | 0.527231 | 0 | 40 | 53.625 | 135 |
luffingluffy/kattis | 8,959,301,813,848 | 29828cb7782e9109af9d19434490bc99813dd795 | 79c854b57055db2e6cf5e1023e3992622d52df81 | /level 1/heartrate.py | c57638529c7426958c74a2f584823e3272293907 | [] | no_license | https://github.com/luffingluffy/kattis | c5794f61bf2bc8ba7cf1c0c7c0097a3161bb477e | ffcfa13fa19de6b39f38dd28740129c1b30fdaee | refs/heads/master | 2022-11-20T17:33:46.721204 | 2020-07-20T14:06:57 | 2020-07-20T14:06:57 | 268,847,302 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | n = int(input())
for x in range(n):
b, p = map(float, input().split())
bpm = 60 * b / p
print("{:.4f} {:.4f} {:.4f}".format(bpm - 60/p, bpm, bpm + 60/p))
| UTF-8 | Python | false | false | 167 | py | 43 | heartrate.py | 43 | 0.479042 | 0.42515 | 0 | 6 | 26.833333 | 69 |
mynameismon/12thPracticals | 240,518,197,048 | 6a9e86535fb39270d6c9f201f0242d9621e8d264 | 80ae520ff4a8cffda39fb152f2330df8069d1850 | /question_11/question_11.py | 15950bac4b48920702ec44c4f64123511ba5095d | [
"MIT"
] | permissive | https://github.com/mynameismon/12thPracticals | 8b6d5db79334776fe86126e5c6cc57caa595ab84 | 1e7a5f949a8276f7fac0943d45918abb7c3f39f4 | refs/heads/main | 2023-08-23T06:21:56.758288 | 2021-10-26T12:46:55 | 2021-10-26T12:46:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pickle
import os
path = os.path.join(os.path.dirname(__file__), "student.dat")
def get_data():
try:
f = open(path, "rb")
file = pickle.load(f)
return file
except Exception as e:
print(e)
# I have assumed here that the data is stored in a list of dictionaries (refer questi... | UTF-8 | Python | false | false | 1,772 | py | 20 | question_11.py | 15 | 0.53386 | 0.522009 | 0 | 64 | 26.6875 | 112 |
Twistedkidd22/Sprint-Challenge--Hash-Theory | 2,250,562,876,019 | 69e06889836228c7e215b4c371f252ec38fcb463 | 1b749028880195fee3cc64d00bad5f8853a8c1cd | /hash-tables/ex1/ex1.py | ed1f504661698e612fae6e736dca3ed60d563ab1 | [] | no_license | https://github.com/Twistedkidd22/Sprint-Challenge--Hash-Theory | 5514ee120473ac9820f163e893e359ad247571bf | 2e23bc8e0e1f9d6fbb3c328cd0879258a1e05af4 | refs/heads/master | 2020-04-01T02:19:10.786727 | 2018-10-12T18:09:36 | 2018-10-12T18:09:36 | 152,774,134 | 0 | 0 | null | true | 2018-10-12T15:49:05 | 2018-10-12T15:49:05 | 2018-10-05T20:33:07 | 2018-10-12T15:49:02 | 4 | 0 | 0 | 0 | null | false | null | def get_indices_of_item_weights(weights, limit):
ht = {}
if len(weights) == 1:
return ()
if len(weights) == 2:
if (weights[0] + weights[1] == limit):
if weights[0] > weights[1]:
return (0, 1)
else:
return (1, 0)
for i, w in enumerate(weights):
ht[w] = i
... | UTF-8 | Python | false | false | 749 | py | 2 | ex1.py | 2 | 0.534045 | 0.485981 | 0 | 33 | 21.69697 | 59 |
evgenii-del/second-blog | 4,561,255,268,477 | eb756510a2747b6081da75249aec13fb531a7ca7 | c3629c667d155e6c60c72e12f838370f9a95193d | /users/urls.py | 6c0f9ad3e9078e1cf3b69592e60872f154b8de61 | [] | no_license | https://github.com/evgenii-del/second-blog | 185f50743516ac73cb4c2059a85ea3f79882cb2d | 532fe4851dd053723a636569bda72587422c78ee | refs/heads/master | 2020-12-20T20:04:26.602341 | 2020-04-17T12:47:49 | 2020-04-17T12:47:49 | 236,195,243 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from users import views as userViews
from django.contrib.auth import views as authViews
urlpatterns = [
path('registration/', userViews.register, name='reg'),
path('authentication/', authViews.LoginView.as_view(template_name='users/authentication.html'), name='auth'),
path('ex... | UTF-8 | Python | false | false | 1,267 | py | 42 | urls.py | 24 | 0.719021 | 0.717443 | 0 | 23 | 54.086957 | 119 |
nspyre-org/nspyre | 12,893,491,872,283 | 72d2597affe49e821b10ab109872af3a3622a632 | c8fd602e5894b04b766d5a68f1e199b9af8c747d | /src/nspyre/instrument/__init__.py | 34ae0f1be99ec6176992da39eb6a4da714028417 | [
"BSD-3-Clause"
] | permissive | https://github.com/nspyre-org/nspyre | f214ec22d80b0768a1380b0c42d3b05f71c45966 | a772070b11be129309201f250ded86b4a4843495 | refs/heads/main | 2023-08-08T19:14:10.258578 | 2023-05-29T23:42:34 | 2023-05-29T23:42:34 | 220,515,183 | 11 | 6 | BSD-3-Clause | false | 2023-08-02T14:07:06 | 2019-11-08T17:21:20 | 2023-08-02T00:40:52 | 2023-07-25T23:20:30 | 3,202 | 19 | 8 | 1 | Python | false | false | from .gateway import InstrumentGateway
from .gateway import InstrumentGatewayDevice
from .gateway import InstrumentGatewayError
from .manager import InstrumentManager
from .server import InstrumentServer
from .server import InstrumentServerDeviceExistsError
from .server import InstrumentServerError
| UTF-8 | Python | false | false | 300 | py | 73 | __init__.py | 55 | 0.883333 | 0.883333 | 0 | 7 | 41.857143 | 53 |
Gomit/Hadoop_MapReduce | 1,520,418,458,461 | 9ec1af7f4743c31f8f349c59207286f734263ab4 | 61714a18aff7a8944359a2175e4ec2f497629938 | /Students and Posting Time on Forums/reducer.py | 87232d2022cdfaccaae5d1d9c3e861d7b68e3616 | [] | no_license | https://github.com/Gomit/Hadoop_MapReduce | ebefeaa7246b758154da90959dfe2a674d94a1a5 | 30597fadb20e5ba368f4658e30ce22194683c7b5 | refs/heads/master | 2020-09-19T14:38:58.998773 | 2016-09-01T09:54:10 | 2016-09-01T09:54:10 | 66,391,249 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import sys
def reducer(reader):
hour_count=[0]*24
oldkey=None
for line in sys.stdin:
data=line.strip().split('\t')
if len(data) != 2:
continue
thiskey,thisHour = data
if oldkey != None and oldkey != thiskey:
for hour,count in en... | UTF-8 | Python | false | false | 750 | py | 9 | reducer.py | 8 | 0.524 | 0.508 | 0 | 32 | 22.4375 | 56 |
nanoamp/agile-pi-ndicator | 6,777,458,430,200 | 221bdd30a565a32271eca15a6a44a23115ff7baa | 2f59315c5e90a2d7fa7e5e02cd2d37a98b6684e0 | /read_prices.py | 3571ed13425d9df1a4b3aef3387fe18ce8431345 | [
"BSD-3-Clause"
] | permissive | https://github.com/nanoamp/agile-pi-ndicator | 0e4a473aba263153309257c59270dbf284a734de | 5a5abd1677a9f83df2de603050a91f25cb4cf50f | refs/heads/main | 2023-03-29T19:14:21.913241 | 2021-04-06T07:05:02 | 2021-04-06T07:05:02 | 354,870,459 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
from urllib.request import pathname2url
import sqlite3
import datetime
import time
def get_prices(count: int) -> list:
prices = []
try:
# connect to the database in rw mode so we can catch the error if it doesn't exist
DB_URI = 'file:{}?mode=rw'.format(pathname2url('agi... | UTF-8 | Python | false | false | 1,892 | py | 9 | read_prices.py | 7 | 0.630021 | 0.61945 | 0 | 54 | 34.055556 | 101 |
CemAlpturk/DeepQNetwork | 9,612,136,849,483 | 4000f0a7b3fb7470495c697d673ebc0d9f9b2f7a | c6c182cbe029b6b031df8a04b967abd5c221ae06 | /src/Agents/QAgent.py | 6ca82b6ceb12633d5ab6af71c5728e7ec6577a5e | [] | no_license | https://github.com/CemAlpturk/DeepQNetwork | 279895208b994f5b23c3b991098683dd591698e2 | 52252eaab6a84d8733c05ac2cb8ba62b55bfb4ee | refs/heads/master | 2023-06-10T05:02:28.770694 | 2021-06-14T07:54:36 | 2021-06-14T07:54:36 | 379,201,588 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import time
import random
import os
from collections import deque
from matplotlib import pyplot as plt
from .NetworkBuilder import NetworkBuilder
from .Controller import Controller
from Logger.Logger import Logger
class QAgent:
"""
Represents a Q-Agent.
An agent that t... | UTF-8 | Python | false | false | 17,015 | py | 507 | QAgent.py | 27 | 0.558272 | 0.55122 | 0 | 445 | 36.235955 | 146 |
tansir1/thesis | 13,718,125,576,271 | 2f76db7fc66f82351eed956c82377902f12207eb | e7c99b703b1771edc6e27c887bfb13127be3b550 | /python_scripts/ObjectivesData.py | b0f6a6d2a6bcb97fb936e79b5ad1b44e4e0f8f46 | [] | no_license | https://github.com/tansir1/thesis | ea0d39f2a597338c9d4f97d891a80e992dbf3535 | 0764114039008bc483604595576ce5bcf57f1a5f | refs/heads/master | 2021-01-25T12:08:23.452851 | 2017-05-14T15:51:02 | 2017-05-14T15:51:02 | 43,273,260 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
class ObjectivesData:
def __init__(self):
self.detected = None
self.destroyed = None
self.known = None
self.plotMarker = 'o'
self.plotColor = None
self.plotLabel = None
#Data values
comm100 = ObjectivesData()
comm100.detected = np.array([ 86... | UTF-8 | Python | false | false | 2,405 | py | 302 | ObjectivesData.py | 176 | 0.639085 | 0.375468 | 0 | 65 | 36.015385 | 80 |
gitotk/python | 14,955,076,145,262 | 39e481c0272df3204a673cccb7fe7fdcef9d8911 | 679840934d19897c558aeea5f91e51295c887c6a | /60_senkei.py | 925208af337b45cfc86b0e2515a9304fdb74c49c | [] | no_license | https://github.com/gitotk/python | 00c7849761f9aba4a4aea0acaf06b001fa8f9c22 | 58dd381c8ea0cfde8c9595ed4755df421d2091b3 | refs/heads/master | 2020-06-18T23:11:00.274603 | 2019-07-12T01:38:03 | 2019-07-12T01:38:03 | 196,487,788 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sklearn import datasets
from sklearn import linear_model
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import numpy as np
#乱数のシードを設定
np.random.seed(0)
#データ準備
x, y = datasets.make_regression(n_samples=100, n_features=1, noise=30)
#学習データとテストデータを分割
x_train, x_test, y_train, y_t... | UTF-8 | Python | false | false | 928 | py | 41 | 60_senkei.py | 40 | 0.716837 | 0.705357 | 0 | 30 | 25.133333 | 72 |
mlabuda2/design_paterns | 16,535,624,121,371 | 200cbada9a067dac1cf53f0b738bd68a1c6154a5 | 254146114bec8f2f3ffa2f513380f93b98ad653e | /singleton/tests/metaclass_singleton.py | f4d5c93f5a5ef0d845ad4bf10041537c13188e19 | [] | no_license | https://github.com/mlabuda2/design_paterns | d047622dede6161b0d1ee020dfa300ce920108e0 | 8d73b851061f5b4e219118d5e51c07704b1d0772 | refs/heads/master | 2022-10-12T08:46:44.620470 | 2020-06-11T12:18:28 | 2020-06-11T12:18:28 | 271,536,705 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # class MyMeta(type):
# _instances = {}
# def __call__(cls, *args, **kwargs):
# if cls not in MyMeta._instances:
# MyMeta._instances[cls] = super().__call__(*args, **kwargs)
# return MyMeta._instances[cls]
# class Singleton(metaclass=MyMeta):
# pass
class Singleton(object):
... | UTF-8 | Python | false | false | 685 | py | 75 | metaclass_singleton.py | 72 | 0.557664 | 0.557664 | 0 | 29 | 22.62069 | 72 |
itspratham/Python-tutorial | 12,996,571,048,493 | 612900a12f83c3ea214728dc0d4fb21ac2e2b2d3 | 9d6091703a2814828f48127088db02d4a4124037 | /Python_Contents/DB/insert_data.py | b9565b5dba0d9df985d32f8da5f0cf7e20ed9f27 | [] | no_license | https://github.com/itspratham/Python-tutorial | 1264c47f44f55a5aa80477b1c74ca72bff894510 | b247d6222aefdb7ac9518fc3911c5df17d880946 | refs/heads/master | 2023-02-09T04:13:39.071396 | 2023-02-03T13:41:46 | 2023-02-03T13:41:46 | 199,325,040 | 2 | 1 | null | false | 2023-02-03T13:43:10 | 2019-07-28T18:49:15 | 2021-12-26T14:27:36 | 2023-02-03T13:42:05 | 8,237 | 2 | 0 | 0 | Python | false | false | import mysql.connector
# Open the db connection
db = mysql.connector.connect("localhost", "root", "password", "python_mysql")
# Open a cursor
cursor = db.cursor()
with open("hello") as fo:
for line in fo:
# print(line)
l = line.split(",")
# print(l)
cursor.execute("INSERT INTO hell... | UTF-8 | Python | false | false | 500 | py | 259 | insert_data.py | 243 | 0.616 | 0.61 | 0 | 19 | 25.315789 | 97 |
rpatrik96/nl-causal-representations | 9,526,237,473,255 | 5ee1e88a623f66d495951ace5256dceb61de8682 | 137fe76975e51cc6b0221067389c4de70055155a | /care_nl_ica/runner.py | cd19b96a1adac0ea5e5d1f4738d7f99cc6dbca4b | [
"MIT"
] | permissive | https://github.com/rpatrik96/nl-causal-representations | 3e9d1d70a163badd9807d8071631fde13abaa979 | a5880c1e4051603d65672996b7c8ff204dabbe37 | refs/heads/master | 2023-05-01T14:04:40.019819 | 2023-04-19T05:21:28 | 2023-04-19T05:21:28 | 361,117,778 | 9 | 1 | MIT | false | 2023-04-07T05:26:55 | 2021-04-24T09:10:11 | 2022-09-24T18:31:52 | 2023-04-07T05:26:54 | 6,900 | 2 | 0 | 0 | Python | false | false | import subprocess
import sys
from os.path import dirname
import pytorch_lightning as pl
import torch
import wandb
from care_nl_ica.dep_mat import jacobians
from care_nl_ica.independence.indep_check import IndependenceChecker
from care_nl_ica.losses.utils import ContrastiveLosses
from care_nl_ica.metrics.dep_mat impor... | UTF-8 | Python | false | false | 10,661 | py | 132 | runner.py | 81 | 0.573023 | 0.566926 | 0 | 285 | 36.407018 | 171 |
techolik/Algorithms | 9,062,381,034,933 | d0dd1d56538c81d92e02fcee8863db9620f60a16 | a18c9b048fdb1140f93f9c34f42abdebfc35a8fd | /hackerrank/PU/euler051.py | 24afeaa5c5886289e0f651025bac000d10fa0ba4 | [] | no_license | https://github.com/techolik/Algorithms | 490d0fb818607763a43551db0f2d6b9d443f3c03 | 9c72de3812615d644c6be178779798e0b2c427f1 | refs/heads/master | 2021-01-13T02:06:40.972144 | 2015-07-20T15:28:10 | 2015-07-20T15:28:10 | 39,391,164 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!python3
# -m cProfile
from itertools import *
from bisect import *
#n, k, l = [int(x) for x in input().split()]
n, k, l = 7, 1, 6
#n, k, l = 6, 6, 1
#n, k, l = 2, 1, 3
#n, k, l = 5, 2, 7
#n, k, l = 3, 2, 4
#n, k, l = 4, 3, 3
def find_prime5(n):
# http://stackoverflow.com/questions/2068372/fastes... | UTF-8 | Python | false | false | 2,682 | py | 94 | euler051.py | 69 | 0.414616 | 0.368755 | 0 | 88 | 28.5 | 117 |
SohailAhmed10/TicTacToe | 10,144,712,762,733 | ef72ea1dd2d54cc9d0447e697e76483898b07a09 | a424d2691d36c8feaebcaa0623f48b7b49033384 | /tictactoe.py | 2180c7cbeecd06bc6712078971891590c46f6e6c | [] | no_license | https://github.com/SohailAhmed10/TicTacToe | 56ed913f930f766888f318d20bcd21edf18073bf | 4a6ecb8ff95c6c2a359147c371d5689ea2fdd325 | refs/heads/master | 2020-03-14T23:45:14.726982 | 2018-05-05T02:16:29 | 2018-05-05T02:16:29 | 131,852,130 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class InvalidEntryError(Exception):
pass
class Matrix():
''' A class that represents a matrix '''
def __init__(self, values):
'''(Matrix, list of lists) -> NoneType
Create a new Matrix with values as its values.
'''
# create the instance va... | UTF-8 | Python | false | false | 6,354 | py | 1 | tictactoe.py | 1 | 0.4339 | 0.421624 | 0 | 160 | 37.7125 | 135 |
alisamadzadeh46/filestore | 5,480,378,297,118 | c236eb61eba4c1cff09ac8361fb80dbed239a103 | ceeeb927544c474163347254b11485cc945ea951 | /administrator/urls.py | 9e38dbc59c8fe4c04ccb9e3dab3fff1205452efe | [] | no_license | https://github.com/alisamadzadeh46/filestore | ecc8d84ca16e8a8a51af0b74446a0c3b88cda646 | 4f31e51b2d028cd5f79b6af06d05568a8af7e9e1 | refs/heads/main | 2023-06-22T18:38:08.179128 | 2021-07-26T16:03:19 | 2021-07-26T16:03:19 | 377,806,835 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path, include
from .views import *
app_name = 'administrator'
urlpatterns = [
path('', include('common.urls')),
path('ambassadors', AmbassadorAPIView.as_view(), name='ambassadors'),
path('products', ProductGenericAPIView.as_view(), name='products'),
path('products/<str:pk>', Pr... | UTF-8 | Python | false | false | 501 | py | 6 | urls.py | 3 | 0.680639 | 0.680639 | 0 | 13 | 37.538462 | 80 |
dartoon/my_code | 11,836,929,910,011 | d0b1c81f8e8af89314b81e4b704fa70041d5f80b | 09ac6ada5c82775dd816d36709ebf6c787b690ab | /for_collbrate/John_Nancy_HSC/HSC_galaxy_example/1_read_result.py | 717943ce15aeb73f4daedb25ec450206027ca7b9 | [] | no_license | https://github.com/dartoon/my_code | 76a240345771bbea7a654390928e7731e4a357b2 | dec99ab02c78325a029068702406fbc568911f3f | refs/heads/master | 2023-08-16T20:00:12.283325 | 2023-08-10T03:50:59 | 2023-08-10T03:50:59 | 138,827,442 | 0 | 0 | null | false | 2022-12-09T06:48:12 | 2018-06-27T03:56:09 | 2022-11-13T04:47:53 | 2022-12-09T06:48:10 | 278,346 | 0 | 0 | 3 | Python | false | false | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 27 17:55:30 2019
@author: Dartoon
"""
import numpy as np
import matplotlib.pyplot as plt
import pickle
import corner
import glob
import astropy.io.fits as pyfits
from gen_fit_id import gen_fit_id
#image_folder = '../images_directory/'
image_folder ... | UTF-8 | Python | false | false | 4,213 | py | 722 | 1_read_result.py | 502 | 0.633753 | 0.609305 | 0 | 117 | 34.965812 | 169 |
mhrodriguez/siita-upv-2018 | 10,660,108,838,532 | cc8ad8b6fee762fb44693f8f05559455557590dd | 5c55964dc1ba07b1484572c2becae5f83ddb6f88 | /solicitud_tuto/migrations/0001_initial.py | 83f57041d9679c29153bc6fc11f966187dd99d36 | [] | no_license | https://github.com/mhrodriguez/siita-upv-2018 | 711c3e753e00b205804dee55e81e2ad60de649a5 | 8cb6700e785235f0a2c2d5c407810be009e2cd4d | refs/heads/master | 2020-03-12T01:49:41.281218 | 2018-05-04T21:37:04 | 2018-05-04T21:37:04 | 127,964,457 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-04-23 16:15
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateM... | UTF-8 | Python | false | false | 1,041 | py | 36 | 0001_initial.py | 32 | 0.618636 | 0.563881 | 0 | 29 | 34.896552 | 149 |
applemin/Deadline_Development | 12,429,635,391,876 | f1c39f656c4d7ecc3c2a05987920357e6d3edca0 | 0a0efc02319e01b9393ac56e4bf144267510c148 | /plugins/DraftTileAssembler/DraftTileAssembler.py | 90d0cf6edeb4a69fdca15ae1ff54572a481a447e | [] | no_license | https://github.com/applemin/Deadline_Development | 791c37d44002ea6010ce45a0798ae126201f63d4 | 75ccfeaf31bc259ceb89a38e65f8f4cdc4cdb0a0 | refs/heads/master | 2022-04-14T01:34:19.623922 | 2020-02-19T04:16:04 | 2020-02-19T04:16:04 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from System import *
from System.Diagnostics import *
from System.IO import *
from Deadline.Plugins import *
from Deadline.Scripting import *
import filecmp
import os
import re
######################################################################
## This is the function that Deadline calls to get an instance of the... | UTF-8 | Python | false | false | 10,594 | py | 356 | DraftTileAssembler.py | 281 | 0.631018 | 0.627997 | 0 | 232 | 44.668103 | 171 |
batalhadematos/addons-tko | 8,461,085,605,540 | d182832e132d4136ef13c35f6ce3df794b7c9102 | 78a389e6dd70a96f7c96295743f3ab5c17716f81 | /tko_discharge_notes/report/common_report_header.py | 09770d23c6e3481057978ac90fdd8ac976a35458 | [] | no_license | https://github.com/batalhadematos/addons-tko | e98a231b41bd5eaf40d047cc0237503fea6562d0 | 7772a9d5d0471490af78e04e7108624895670bbc | refs/heads/master | 2015-08-17T15:24:45.680622 | 2015-07-05T15:36:20 | 2015-07-05T15:36:20 | 27,509,195 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | UTF-8 | Python | false | false | 7,578 | py | 149 | common_report_header.py | 50 | 0.581948 | 0.577857 | 0 | 148 | 50.195946 | 220 |
wm-public/sge | 11,776,800,365,823 | 677d115e8eb60b93bb1c762b756bcdab189bf215 | b307b5c5586d9b1a8b7e9d64024c078e2f185a3f | /personal_log/urls.py | 450a3a49144be7d364b15ce4efb2a46aeb01916e | [] | no_license | https://github.com/wm-public/sge | d415f12c48afc7f9cd63b3a0f8348d6959c97c2d | 34901fc03d27accd1c7bd92983248c7a64b05843 | refs/heads/master | 2018-10-14T01:21:24.117757 | 2018-10-03T16:18:57 | 2018-10-03T16:18:57 | 134,367,511 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.conf.urls import url
from personal_log import views
urlpatterns = [
# url(r'^update/(?P<person_id>\d+)/(?P<is_patient>\d+)/$', views.personal_log_update, name='personal_log_update'),
]
| UTF-8 | Python | false | false | 202 | py | 220 | urls.py | 135 | 0.683168 | 0.683168 | 0 | 6 | 32.666667 | 118 |
smetanadvorak/myo-python | 11,355,893,560,896 | b06e4c080a9ab4a1861b50cd649a910b166b2c25 | e0231fcdd20bbcb13668cbce226a63af360c5d1b | /myo/macaddr.py | 25b53cf1df490470304c14934fc78f0f44e3c264 | [
"MIT"
] | permissive | https://github.com/smetanadvorak/myo-python | ee7e90fa07a71481c41469356ecdef9895d887e7 | 35fd8fe3f577e8e4bd1bd58a75fa2f4d56969997 | refs/heads/master | 2022-06-08T19:08:25.243283 | 2020-05-04T15:16:39 | 2020-05-04T15:16:39 | 259,960,172 | 0 | 0 | MIT | true | 2020-04-29T15:09:53 | 2020-04-29T15:09:52 | 2020-04-26T15:41:45 | 2019-10-12T22:50:06 | 1,613 | 0 | 0 | 0 | null | false | false | # The MIT License (MIT)
#
# Copyright (c) 2015-2018 Niklas Rosenstein
#
# 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, ... | UTF-8 | Python | false | false | 3,097 | py | 13 | macaddr.py | 8 | 0.691314 | 0.682919 | 0 | 97 | 30.927835 | 78 |
tma5/FreeTakServer | 2,585,570,337,998 | b8a145901c3bb09f90e99ea14ff254b01df958ec | c54af0739246a1cda2b4642d70cd3b89dd6ad77c | /Old/CoTtest.py | c188c69a8afe5eb8979f1bc0cd69ffb9ae8dd3e3 | [
"MIT",
"EPL-1.0"
] | permissive | https://github.com/tma5/FreeTakServer | 043e2b2e9c361937edb3d12db5201328088df618 | 794eee7cc0086d5d54193b2033fab2396b90b0e2 | refs/heads/master | 2023-02-27T01:16:02.784697 | 2020-06-05T01:37:50 | 2020-06-05T01:37:50 | 269,503,190 | 0 | 0 | MIT | true | 2020-06-05T01:33:32 | 2020-06-05T01:33:32 | 2020-05-21T19:56:50 | 2020-05-16T19:45:07 | 9,053 | 0 | 0 | 0 | null | false | false | import datetime as dt
import uuid
import xml.etree.ElementTree as ET
import socket
import logging
logger = logging.getLogger("django")
ID = {
"pending": "p",
"unknown": "u",
"assumed-friend": "a",
"friend": "f",
"neutral": "n",
"suspect": "s",
"hostile": "h",
"joker": "j",
"faker":... | UTF-8 | Python | false | false | 1,353 | py | 47 | CoTtest.py | 40 | 0.529933 | 0.497413 | 0 | 68 | 18.911765 | 52 |
kkahloots/Rethinking_Data_Effeient_GANs | 13,082,470,426,417 | c611f1ee0be5f7d5e9097706be6b97e9b84514a4 | a1b7be1e987a7aaf6beb96da9c6b0f4d6140c3f2 | /augmentation/Cutout.py | cf4ae37da9c4717171890ca3db7185ae255c4463 | [] | no_license | https://github.com/kkahloots/Rethinking_Data_Effeient_GANs | c64c2aa9d7ff1eb619e92761e223021ea6bddaeb | 7265d7e5021d03e359ab50c9190ca416161ae9c5 | refs/heads/master | 2023-02-28T02:04:22.859682 | 2021-02-04T11:57:44 | 2021-02-04T11:57:44 | 320,330,900 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tensorflow as tf
import tensorflow_addons as tfa
from augmentation.Coloring import adjust_color
import numpy as np
import cv2
def cutout(images, **kwargs):
images = images * kwargs['mask']
#dbatch = dilation2d(images)
#condition = tf.equal(images, 0)
#images = tf.where(condition, dbatch, ima... | UTF-8 | Python | false | false | 2,766 | py | 25 | Cutout.py | 13 | 0.62726 | 0.592552 | 0 | 68 | 39.676471 | 181 |
simasima121/punchstarter | 6,562,710,038,984 | 89eae557a3804716f97a765ff4c298e8ed64f486 | 68c1bfbd70a8e2ea24b1b8907aecf58727d4afe9 | /punchstarter/__init__.py | fa604d90369c53dc8315fe6a0c9d9c9f08afd9ba | [] | no_license | https://github.com/simasima121/punchstarter | 72916435dfaf68d31b363201e6793f69f3939dd3 | 23601d2abedfbf137c7e584a505360d3a5072a5c | refs/heads/master | 2021-01-10T03:16:39.306658 | 2016-03-16T13:01:15 | 2016-03-16T13:01:15 | 54,031,571 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask
from flask.ext.script import Manager
app = Flask(__name__)
manager = Manager(app)
@app.route("/")
def hello():
return "Hello World!" | UTF-8 | Python | false | false | 162 | py | 1 | __init__.py | 1 | 0.691358 | 0.691358 | 0 | 9 | 17.111111 | 36 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.