blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a2da498d2614375c34b0142a20ec374d8c0edea7 | 4127d5fe46ef305f9436b1860259f9062ca1d513 | /posts/forms.py | 995c0ddc020b256b2e770dc7dbe63c8961dc2b9b | [] | no_license | dlee0528/Apricity | 397ab05a72929c1907aeb8ee3334f90c052f964d | 5d2e8be4f07f4fec5cfbab4d654477577c1b5b2f | refs/heads/master | 2022-10-07T07:52:34.685418 | 2020-06-06T01:50:30 | 2020-06-06T01:50:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 837 | py | forms.py | from django import forms
from .models import Post
from django.contrib.admin import widgets
from django.forms import ModelForm
# Create the form class
class Form(ModelForm):
class Meta:
model = Post
fields = ['title','username', 'body', 'created_at']
# def __init__(self, *args, **kwargs):
... |
66d0b7edbd94bdeb22987447666ab972e7bcf283 | 1043dc391dcf64fa0af7cc559a8cbd93faa9d2b3 | /__manifest__.py | 9c93fe0d41342e57a4844d8aae7f5083282bc7d2 | [] | no_license | Zelwak/dip_school | a08c77a91f1a354898ff6e6463d7d7705a4bfcd9 | 4b2580ed8aa474fbb61226518ed9ada76a476570 | refs/heads/master | 2020-03-10T00:30:43.660883 | 2018-04-11T11:33:46 | 2018-04-11T11:33:46 | 129,083,427 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 713 | py | __manifest__.py | # -*- coding: utf-8 -*-
{
'name': 'Gestion de lycée',
'version': '0.1',
'category': '',
'summary': "Gestion de lycée",
'description': "Module de gestion de lycée",
'author': 'Flavien CHÊNE (fchene@team-dsi.fr)',
'website': '',
'depends': ['base'],
'data': [
'security/school_s... |
e5cff035dd812bd82f40b5669be1fd8b52c0ea12 | f232c3b74b9dbbb58019c8ca680136780c89d982 | /stochastic_synapses/parameters.py | 392848ff1b2260c3cb6b73a205acefec2e5d8088 | [
"MIT"
] | permissive | anurag0511/Stochastic_synapses_TaskAgnosticCL | c5a5283057f072cc3afbead6fa880a1b3fa69198 | 9c09b21d8f7b18a9c263ffc5e9e61e6d42d0ea9d | refs/heads/master | 2023-03-15T16:24:42.545132 | 2023-03-06T21:35:37 | 2023-03-06T21:35:37 | 297,462,497 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | parameters.py | global param
param = {
'dataset': 'mnist', # mnist or fmnist dataset
'cuda': 0, # GPU (1) or CPU (0)
'dataloader': 0, # Load dataset from dataloader
'n_tasks' : 5, # Number of splits in the task
'n_classes' : 2, # Classes per task
'n_epochs' : 10, # Number of traini... |
134098acdf17d81500cdd9c5149d90fae2b98375 | 483e789214030766d8065c9bdfdc64b31393ab10 | /cornac/datasets/__init__.py | 6155c13ba41f5bd9418916ecc8b48fc2c989dda0 | [
"Apache-2.0"
] | permissive | Andrew-DungLe/cornac | 66606d07f67d046845e0eb6d5c7bfac58240c209 | 199ab9181f8b6387cc8748ccf8ee3e5c9df087fb | refs/heads/master | 2020-04-18T06:32:09.822259 | 2019-01-25T13:16:26 | 2019-01-25T13:16:26 | 167,324,900 | 0 | 0 | Apache-2.0 | 2019-01-24T07:42:38 | 2019-01-24T07:42:37 | null | UTF-8 | Python | false | false | 105 | py | __init__.py | from .movielens import MovieLens100K, MovieLens1M
__all__ = ['MovieLens100K',
'MovieLens1M']
|
e4f9e10621386dbc1dc6866bc677a0d01718dda4 | 31a9cd341bb91679202783ba6cb3021a7f26f107 | /time_test.py | c499a42204e2b68f422986b4c8c37c7147142009 | [] | no_license | carlfsmithiii/numseq_package | 3ba672d55b4e96449958d610fa7e260a1d8d143b | 487a995305dff89e9b7b7bf1642ee6e584eb3906 | refs/heads/master | 2020-04-08T09:06:08.916747 | 2018-11-26T18:18:40 | 2018-11-26T18:18:40 | 159,207,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | time_test.py | import timeit
print("total execution time: "
+ str(timeit.timeit("test_code.numseq_package_test()",
setup="import test_code", number=1)))
|
d0ad1e37dea1ea25e975da062d1da1b7174ecccf | 006a922e3f57c025898622f82d60bba76e302f68 | /appointments/migrations/0002_auto_20161020_0659.py | e6d0d7831a51628b370fd9771e53041679b8fa10 | [] | no_license | munsu/mcm | e7af4a65b8df509f5ea9e9eec80036bf1c5b2eb7 | a4d2da3aaa6c16553a51ecb350f1b839cddd7ddd | refs/heads/master | 2022-01-29T06:49:45.006407 | 2017-05-05T00:26:37 | 2017-05-05T00:26:37 | 220,062,384 | 0 | 0 | null | 2022-01-21T19:55:55 | 2019-11-06T18:22:44 | JavaScript | UTF-8 | Python | false | false | 1,295 | py | 0002_auto_20161020_0659.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-20 06:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('appointments', '0001_initial'),
]
operations = [
... |
c92463266973b8827e2b0753dc7ca2f24719ff80 | 24bf46f243dc6efbe28b714b47b8e0302bb1296d | /Week8/ex3/front_back.py | a02edcb1b98b1b06548675e22d399494dd48b3df | [] | no_license | AizadaNur/WebDev | 5e14387dfa6d415de0ac2198f03857b8bb5fc602 | e1e14e6642b8ce4db7319779765de86c82dea331 | refs/heads/master | 2022-04-10T11:20:44.359588 | 2020-04-06T12:34:59 | 2020-04-06T12:34:59 | 250,175,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | front_back.py | def front_back(str):
if(len(str)==0):
return str
mid = str[1:len(str)-1]
return str[len(str)-1]+mid+str[0] |
715a0b355e27de3cad1fd3eb9ccd383a80b22c90 | 26dec2f8f87a187119336b09d90182d532e9add8 | /mcod/watchers/tests/test_models.py | 162d3a55774c80fb7082bab66135b4a859f9f2d2 | [] | no_license | olekstomek/mcod-backend-dane.gov.pl | 7008bcd2dbd0dbada7fe535536b02cf27f3fe4fd | 090dbf82c57633de9d53530f0c93dddf6b43a23b | refs/heads/source-with-hitory-from-gitlab | 2022-09-14T08:09:45.213971 | 2019-05-31T06:22:11 | 2019-05-31T06:22:11 | 242,246,709 | 0 | 1 | null | 2020-02-24T22:39:26 | 2020-02-21T23:11:50 | Python | UTF-8 | Python | false | false | 9,199 | py | test_models.py | import pytest
from django.db import transaction
from django.db.models import fields
from django.db.utils import IntegrityError
from django.utils.timezone import now, timedelta
from pytest_bdd import given, then, scenario
from mcod.watchers.models import ModelWatcher, WATCHER_TYPE_MODEL, InvalidRefField, ObjectCannotBe... |
5774fe398fa81c6116061dc8fd1ec9310859da05 | 69f9d0c0c4f23dd3e5088b622110630ec4971260 | /YoloDataset/lego-gubbar-detection/TestingFiles/backgroundtestv3.py | 7afbe5e539489ea080f9811aa8fdc51a95af95f2 | [] | no_license | SimOgaard/YoloDatasetCreator | fcc829ddc5537aa2bc4e5b2403bff046620312b3 | d6e1ba42e12761db71e0881b308544ab7a9cc40f | refs/heads/master | 2023-03-16T16:41:13.513722 | 2021-03-26T18:19:28 | 2021-03-26T18:19:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,100 | py | backgroundtestv3.py | import cv2
import numpy as np
import glob
from PIL import Image
#== Parameters =======================================================================
BLUR = 11
CANNY_THRESH_1 = 240
CANNY_THRESH_2 = 255
MASK_DILATE_ITER = 9
MASK_ERODE_ITER = 9
MASK_COLOR = (0.0,0.0,0.0) # In BGR format
#== Processing ===============... |
49245a2a8976bd95cca641d00d3f0fe928d2135b | cb9643c965c0055791e564732f96073d504655d7 | /CRAFT-pytorch/package_print_set.py | e355e7658351ce692f68d2817db7bf69fd66cedd | [
"MIT"
] | permissive | graceon/article_model | f05f96987dbd2550e0f031eda7a4c44d4c515819 | eaec0b52f037a2983cf4c981e091100d448ab330 | refs/heads/main | 2023-01-20T14:45:45.568554 | 2020-11-29T11:41:39 | 2020-11-29T11:41:39 | 316,929,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,203 | py | package_print_set.py | import torch
import os
from PIL import Image
import matplotlib.pyplot as plt
import config
import cv2
import numpy as np
from torchvision import datasets, transforms
ToTensor = transforms.ToTensor()
base_dir = 'E:/myops/'
res_dir = 'E:/myops/res'
char_hw = 32
def adapt_size(cell):
origin_w , origin_h = cell.s... |
58ad8dfe4d7b2a8b8bf75f13e92e45954d95739f | 0f0a5cda98abd85dce96601a1886d45dd3fcff2d | /test_transpose.py | 151aabf053e2ca6bb4bf0ebb945d8331cfe8c1de | [] | no_license | danolee/transpose | 907d1682825b42750de4b81c0b6553c35809889e | a3c8cce1eaa7ce12f3ecf20a51fd383db57a4228 | refs/heads/master | 2023-07-03T06:57:26.141808 | 2021-08-02T14:14:24 | 2021-08-02T14:14:24 | 391,454,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,153 | py | test_transpose.py | #!/usr/bin/env python
"""Test coverage for transpose.py"""
import transpose
import pytest
def test_load_valid_file():
"""Tests to verify transpose.load_file_to_list(filename) with valid file"""
assert transpose.load_file_to_list(
"test_files/test_data1.txt"
) == ["abc", "xyz", "mnop", "qrstu", "j... |
20648aee9771fc8df4863a92c21e2154ea03ee10 | 4f13870b7f65ff1f6a3ae067855fa89fda7c9d55 | /options/admin.py | 3a7fd2403d2fb3bd3916644cb93a426516c9f5c7 | [
"MIT"
] | permissive | marcosgabarda/django-simple-options | b86a4aac1d76ca63471afa20c9f05f69881ae5f6 | 55a51f75bddf903c52174a0c4bbf1c73c2bb9cc7 | refs/heads/master | 2023-04-27T02:36:04.749298 | 2022-08-09T10:33:48 | 2022-08-09T10:33:48 | 82,943,831 | 4 | 3 | MIT | 2023-04-21T22:10:59 | 2017-02-23T15:56:37 | Python | UTF-8 | Python | false | false | 601 | py | admin.py | from django.contrib import admin
from options.models import Option, UserOption
@admin.register(Option)
class OptionAdmin(admin.ModelAdmin):
"""Manage configuration options."""
list_display = ["public_name", "value", "is_public", "help_text"]
list_filter = ["is_public"]
search_fields = ["public_name"... |
9ea125edadfe5a629a3053a8dfa5afca6455ef45 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/roman-numerals/44f962910f42485396a2f95cce78a2d4.py | 4398e15ca896fc6f781446705d2f6806de957359 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 437 | py | 44f962910f42485396a2f95cce78a2d4.py | __author__ = 'jimblackler'
def convert(number, tens, fives, ones):
return ['', ones, ones * 2, ones * 3, ones + fives, fives, fives + ones, fives + ones * 2, fives + ones * 3,
ones + tens][number]
def numeral(arabic):
return ('M' * (arabic / 1000) +
convert(arabic % 1000 / 100, 'M', ... |
229ae86ccadd133af5ac21694a9c04a016540433 | 6cb4f70534e4087ef11163a1c660374784a9bb6c | /sky/tools/download_material_design_icons | c88e216b30ace2c091774e588eea7f8618a8b7af | [
"BSD-3-Clause"
] | permissive | yodamaster/engine | 07a3e576b680f6c2d0db30c0b0be763d279f5884 | 33e5611409d261f8783e762e69e82b1dfa3ac480 | refs/heads/master | 2021-01-16T22:22:17.491692 | 2015-11-13T22:02:30 | 2015-11-13T22:02:30 | 46,162,097 | 1 | 0 | null | 2015-11-14T04:58:45 | 2015-11-14T04:58:45 | null | UTF-8 | Python | false | false | 2,040 | download_material_design_icons | #!/usr/bin/env python
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import shutil
import subprocess
import sys
import urllib2
SRC_ROOT = os.path.abspath(os.path.join(__file__, os.pardir, o... | |
5df4b701d92562ad3a88de67335d8dbd7c4f0a4f | 2566999443b7a9ec9ab8d674fee2d7088b810aec | /Python/38. Count and Say/count.py | d085d5e032efa79270c4b62bd9679c7ab8989072 | [] | no_license | ws3109/Leetcode | 1f27fbd020fdc5a51e395a368dfd9bccc11bda88 | 0c1419550777dfa5f707887bc5c766e171dbc036 | refs/heads/master | 2021-05-08T07:19:11.586438 | 2017-11-03T03:53:34 | 2017-11-03T03:53:34 | 106,742,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | count.py | class Solution(object):
def countAndSay(self, n):
"""
:type n: int
:rtype: str
"""
result = "1"
for i in range(1, n):
result = result + '*'
temp = ""
count = 1
for i in range(1, len(result)):
if result[i]... |
4df262185d0b66999eecc8644aa62b7de486afe6 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /YRwZvg5Pkgw4pEWC5_10.py | 02da8483c8e3a33c7fa6b4f83a284e8f6fb4495c | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | YRwZvg5Pkgw4pEWC5_10.py |
def flick_switch(lst):
cur = True
arr = []
for x in lst:
if x == "flick":
cur = not cur
arr.append(cur)
return arr
|
86aff9e122d44fa483cc315867da4873e4b5d866 | 224afc0584213f70959c8a7da30146da19aed98d | /array/rotateImage.py | 7d6672164f9c298c1ce84698284cd150f0b65044 | [] | no_license | zxmeng/LeetCode | 26c2eb458912c2137bf0af4cdd31868260d9ba59 | 131aae52be6a62b284aee686dcb17ff85809a416 | refs/heads/master | 2020-03-15T03:41:36.019361 | 2018-06-20T03:53:50 | 2018-06-20T03:53:50 | 131,948,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | rotateImage.py | def rotateImage(a):
n = len(a) - 1
for i in range(n+1):
for j in range(i, n-i):
temp = a[i][j]
a[i][j] = a[n-j][i]
a[n-j][i] = a[n-i][n-j]
a[n-i][n-j] = a[j][n-i]
a[j][n-i] = temp
return a |
1fac917c9a2317f833501968d0764d93473b8d1c | 3eddc24d4e8e4a32d6043919220d8acfdf6c9474 | /workshop/create_app.py | 05881b306a87b4f7ba2338362c87a7f9009cae49 | [
"MIT"
] | permissive | henkjurriens/hackathon-school | 8c9db4a88867f445ef67d498e2610e35be246c8a | b8adae7e6fdb9c0f4bc34eeaec9ca1cbf24ecf13 | refs/heads/master | 2016-09-05T12:28:50.584540 | 2015-01-05T19:06:30 | 2015-01-05T19:06:30 | 26,171,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,991 | py | create_app.py | import string
import shutil, errno
import sys
import subprocess
import os
def copyFolder(src, dst):
try:
shutil.copytree(src, dst)
except OSError as exc: # python >2.5
if exc.errno == errno.ENOTDIR:
shutil.copy(src, dst)
else: raise
def createFriends(group):
template = "... |
42af383e7d67b5031e8439a6777ef38b215195ce | e2b334331306218c5fb922f42f134e6fff63c930 | /HW4/ssprint.py | 93cb97da698d3e684fc4a17c06b7820904616d6f | [] | no_license | pan-jessica/CSE210A | 9895bdf0e798f0b7196cb8fc764aff30c61aa23f | a80f2df8782350989f6d89c7252a9a3f0f18d389 | refs/heads/main | 2023-03-22T08:28:53.894593 | 2021-03-18T07:02:50 | 2021-03-18T07:02:50 | 328,746,502 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | ssprint.py | # This transforms the AST into a nicer format when we print out step by step
from lark import tree, Lark
class StepbyStep(object):
def __init__(self):
self.map_oper = {"add": "+",
"mul":"*",
"sub": "-",
"div": "/",
"and": ... |
51919d5e952e1b7f41ce5cd62d80dee882650514 | c639cbaf834feacbf59e00767df224df3473e44a | /pywren_ibm_cloud/compute/compute.py | cae94311be0bcfc63d120747c990b5951574296f | [
"Apache-2.0"
] | permissive | tomwhite/pywren-ibm-cloud | e3fccb906a792230854e1f9ac47d8039824cc30c | dbc87a6102d74284d03300e72e24a430c7deadd4 | refs/heads/master | 2022-11-10T16:38:28.028892 | 2020-06-28T16:22:32 | 2020-06-28T16:22:32 | 263,904,742 | 1 | 0 | Apache-2.0 | 2020-05-14T12:09:26 | 2020-05-14T12:09:25 | null | UTF-8 | Python | false | false | 2,628 | py | compute.py | import os
import logging
import importlib
logger = logging.getLogger(__name__)
class Compute:
"""
A Compute object is used by invokers and other components to access
underlying compute backend without exposing the implementation details.
"""
def __init__(self, compute_config):
self.log_l... |
d817d8b1aefb24e08180ede26610aafe277394d0 | b6a17f2dfb30e3b6ae1b39f9dd5e5187056f6a03 | /tests/internal/valid/upgradeble/builtin_enumerate/1.py | d4a6ed3932c83d7e85d32a999337857d79171f14 | [] | no_license | gridl/inspectortiger | a9696f8f0bd62498154bf34902f8aea075ea197e | 6b9736b22528493cd41d0bf92f9fdcdd6c7cd129 | refs/heads/master | 2020-08-16T06:36:03.120934 | 2019-10-13T19:27:06 | 2019-10-13T19:27:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | 1.py | for i in range(len(counts)):
support.run_doctest(test_genexps, verbose)
gc.collect()
counts[i] = sys.gettotalrefcount()
|
1d16ea22e0c269125b634a3e4c970496b096a1e7 | da69c31ec6eafd545f62a979014d6bf06b187512 | /testing/api/test_dashboards.py | 5126d60afcc359afeca672c51bd90fdfb6ceaff0 | [
"CC0-1.0"
] | permissive | dirigit/WALKOFF | ffba8e9134588ea22b1ef51c9d00949211e06f2e | ec70db590060b0c2ab24a19677d4445621c29d01 | refs/heads/master | 2020-12-13T22:23:16.705568 | 2020-05-03T06:53:52 | 2020-05-03T06:53:52 | 234,548,177 | 0 | 0 | NOASSERTION | 2020-05-03T06:53:53 | 2020-01-17T12:53:18 | null | UTF-8 | Python | false | false | 5,550 | py | test_dashboards.py | import json
import logging
from starlette.testclient import TestClient
logger = logging.getLogger(__name__)
base_dashboards_url = "/walkoff/api/dashboards/"
def create_and_execute_workflow(api: TestClient, auth_header: dict):
with open('testing/util/dashboard_workflow.json') as fp:
wf_json = json.load(... |
f164783bc1e9b127802c945758bb0690d1588c09 | b926c46d095a7b22f8d808608470bef869730a1c | /3/doublechromosphere.py | 4904dd26553fbc493e61bbf1b9db6d15b9b203f6 | [] | no_license | jesee030/-python- | 369dd4ef70feec763867ea3ec2ac266922e30d4d | 41bf96f08dea2aadf6d9219589b627c919b75990 | refs/heads/master | 2023-03-29T05:57:41.091973 | 2021-04-09T12:21:55 | 2021-04-09T12:21:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,148 | py | doublechromosphere.py | from random import randrange, randint, sample
import random
def display(balls):
"""
按照题目所要求格式输出列表中的双色球号码
:param balls:双色球号码列表,如[9,12,16,20,30,33 3]
:print:输出格式为09 12 16 20 30 33 | 03
:return: 无返回值
"""
# 请在此处添加代码 #
# *************begin************#
for i in range(len(ba... |
068d52c964e05b33e3cb59bef047370497e1cc88 | 335eab97320b0fdb516d09b341b23701614ae9ac | /utils/dbclient.py | 169425491f21a0fd154a402c83eef44ea2a55d34 | [] | no_license | rodulforg/mastermind | e5b509506ec93ebfb708a5f165d74ece9447ddaa | 726a70eb0cf9db77eefc3e5ef22c561f5a81374f | refs/heads/master | 2020-03-29T15:44:47.921492 | 2018-09-26T14:24:07 | 2018-09-26T14:24:07 | 150,078,540 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,545 | py | dbclient.py | #!/usr/bin/python
import configparser
import json
import os
import pymysql
class DBClient():
connection = None
config = configparser.RawConfigParser()
def connect(self):
try:
if "MASTERMIND_PRODUCTION" in os.environ:
self.config.read('config/production.cfg')
... |
d777ea80c463e0d8a20995ccad2d5ffadc6b6357 | cf3e9398e4a1a8b41aa12e3ef42aa2a73bff2507 | /src/compiler/sequencer_test.py | 81057098c7365722fd789052536ecafc2745c509 | [
"Apache-2.0",
"MIT"
] | permissive | fritzo/pomagma | fb207e8bfd77c7ac592ddb27d5fd3213da50a532 | ad2bf9c12eb58190f2761608c053ac89d3ddf305 | refs/heads/master | 2023-02-24T16:54:31.981623 | 2023-02-10T23:17:42 | 2023-02-10T23:17:42 | 4,943,857 | 12 | 0 | NOASSERTION | 2023-02-10T23:17:43 | 2012-07-08T05:22:16 | C++ | UTF-8 | Python | false | false | 129 | py | sequencer_test.py | from pomagma.compiler import sequencer
def test_alphabet():
assert len(sequencer.alphabet) == len(set(sequencer.alphabet))
|
2ed77b72d0b31bea498036cf94be7721b65213fe | 400f742792558f6693458186389db5cfb031efea | /SpiMediaGallery/main/management/commands/fix_duplicate_manualtags.py | a42596d5171f8ebe0f4a68cdbdaf7aab961f1026 | [
"MIT"
] | permissive | Swiss-Polar-Institute/spi-media-gallery | 17110f1d599dbd9e386a9f6627fdc509b8a2118b | 49798f5301c0facc6315b4a3e9613a51ada07583 | refs/heads/master | 2023-08-30T15:15:40.770256 | 2023-08-09T12:48:53 | 2023-08-09T12:48:53 | 201,445,080 | 6 | 3 | MIT | 2023-08-03T09:51:26 | 2019-08-09T10:20:43 | Python | UTF-8 | Python | false | false | 1,360 | py | fix_duplicate_manualtags.py | from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand
from ...models import Medium, Tag
from ...progress_report import ProgressReport
class Command(BaseCommand):
help = "If a photo is tagged by the same tag name more than once and one of the tags is Manual: unt... |
77893f9372f9019c57ba91a9633385582a7525b8 | 05628a3484362453090c6ca4ee2e221528ee0fc1 | /dairy_erp/dairy_erp/doctype/farmer_settings/farmer_settings.py | 877ff608add0de2af22275f6b44133b7fff28faf | [
"MIT"
] | permissive | itsdipak/Dairy_project_Daiyerp | feb9290ff6b70995050f717c129083cf667ac349 | 635d34115f0eb2081b6835a190eda4971dbfb99f | refs/heads/master | 2022-01-25T11:56:32.925907 | 2018-11-23T06:49:44 | 2018-11-23T06:49:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,647 | py | farmer_settings.py | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Stellapps Technologies Private Ltd.
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
class FarmerSettings(Document):
def validate(self):
if frappe.db... |
b7752627f1321791bd925770a2801b95871d1a2c | 3936d13c07326df3c67da15bfe8d713555713e27 | /zno.py | 1d2b3e4317fb797147b76237db3707a9c8adfaa0 | [] | no_license | MuhammetKaraali/pizza123 | 590d9da1cd089aaab5f32d8eca64bb2b767c78fa | 20f70fb0bceea42a5b3e313f2fea8c6ca7de2a28 | refs/heads/master | 2023-07-11T04:52:55.870399 | 2021-08-18T16:25:10 | 2021-08-18T16:25:10 | 397,650,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py | zno.py | import sqlite3
dbase = sqlite3.connect('pizzares.db')
dbase.execute(''' CREATE TABLE pizza_user(
USER_NAME TEXT NOT NULL,
PIZZA_PRICE INT NOT NULL)''')
dbase.commit()
dbase.close() |
a00a9740a8ffbd1089ed5f948606a7eab7c4f1b0 | ba420fc4654a3492db7d42bc54973cd1a4920f09 | /app/my_bookings.py | 9cc68fa7f9138117154d3d3cf075ad92a47db2b6 | [] | no_license | hgihyks/Railway-Reservation-Portal | 2a6f7fda018bf113ff46bb42ab6daf12dba552e8 | e4cc949127ecc44bccb11160a40150486dff34e6 | refs/heads/main | 2023-02-17T23:47:24.768504 | 2021-01-12T13:44:49 | 2021-01-12T13:44:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 957 | py | my_bookings.py | from main import *
@app.route("/my_bookings")
def my_bookings():
if request.method == "POST":
req = request.json
uname = req["uname"]
# adding the attributes that I need in AJAX
#attr = ["trainno", "pnr", "source", "doj", "start_time", "dest", "end_time", "amount", "fname", "lname", "age", "gender", "coach",... |
63dc0522d73d8ec850677ee398ea8ba4b9b63b10 | f6b8b89311cf9e0b85a4582ab8a436cebfded525 | /scripts/src/college/classLinks.py | 6bb6ced361f0fb45712330f498b8e4ed13de7079 | [] | no_license | Reprezent/linux-stuff | cb894a94a1464512d8af89c5a60954c4343e57de | 6cabb09dad993d4efecdfe8a968c3cfb80af89dc | refs/heads/master | 2023-03-05T02:30:15.377978 | 2023-02-25T14:57:58 | 2023-02-25T14:57:58 | 119,230,742 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,594 | py | classLinks.py | #!/home/rriedel1/src/Python-3.5.2/pyhton
import sys
import http
import urllib.parse
import urllib.request
import re
import getpass
# HEADER CONTENT
__prompt__ = "UTK class linker: See who's in your classes!"
__author__ = "Richard Alexander Riedel"
__copyright__ = ""
__credits__ = ["Richard Alexander Riedel"]
__date_... |
b30d8a079df0346127daa077e035942bfa1aec52 | 69b9efa742ad9642c366e5cf0dfa66220e86da1e | /cocoon/scheduler/signals.py | f60cc1fa7d0008c9da80c0396415cdfc012bed5f | [] | no_license | tiusty/Cocoon | f1321493b7d3240177da21ff2222b51f71f49a0b | bdc305eb42c9d3864a0caa2e65e783e4cfbfc5b4 | refs/heads/master | 2022-03-16T15:24:07.565619 | 2019-05-09T00:23:34 | 2019-05-09T00:23:34 | 75,447,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,415 | py | signals.py | # Django module imports
from django.db.models.signals import post_save, post_delete, pre_delete
from django.dispatch import receiver
from django.core.mail import EmailMessage
from django.template.loader import render_to_string
# App module imports
from .models import ItineraryModel
@receiver(post_save, sender=Itiner... |
63c3a44a245eb63a653179ae92f20f4da2eefcd1 | c5187c9ed4aa0727f4def001d5822addf1fcd8d1 | /databricks_cli/groups/cli.py | 478c9675ba65332761266dd1da8ceaa0d84f414d | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | alinxie/databricks-cli | acee6004bbd677c799c7821e256a820e40d06a80 | a7a150d8754dbbc121643357ef07055fbd36c711 | refs/heads/master | 2020-03-18T00:41:51.120728 | 2018-08-06T22:47:03 | 2018-08-06T22:47:03 | 134,108,034 | 0 | 0 | null | 2018-08-06T22:32:12 | 2018-05-20T00:31:51 | Python | UTF-8 | Python | false | false | 6,376 | py | cli.py | """Provide the API methods for GROUPs Databricks REST endpoint."""
# Databricks CLI
# Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"), except
# that the use of services to which certain application programming
# interfaces (each, an "API") connect requires that the use... |
2241853a381095f440f636460b5b725c6f1bc90b | ec367692e14563d4d3cc5887b69bb984c7ea74ad | /Day 28 RegEx, Patterns, and Intro to Databases/funcitonalAndRe.py | 25d27cf06479a0d619e8b039f0a6c20047722a03 | [] | no_license | chien-wei/HackerRank | c899fdf12a3df96b70248200cc9e791f35b40f00 | d744af9f75aadef98ec69225a17ccd990a52d143 | refs/heads/master | 2021-05-14T13:06:49.164065 | 2018-02-04T15:13:23 | 2018-02-04T15:13:23 | 116,427,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | funcitonalAndRe.py | #!/bin/python3
import sys
from itertools import *
import re
N = int(input().strip())
name = []
email = []
for a0 in range(N):
firstName,emailID = input().strip().split(' ')
firstName,emailID = [str(firstName),str(emailID)]
name.append(firstName)
email.append(emailID)
print("\n".join(sorted(list(filte... |
a97c9d6cf934845703e7f92d5aa8472ff9d09e60 | d4d6483283069848f5746ce2716c1703b93cc7f4 | /LeetCode/LeetCode_2.py | ec6b2c3d1ec001a79aaf8809a43ff458e64c4ef5 | [] | no_license | No1CharlesWu/Python | d77a43b0773729e30235e185b352b0bd284b0edf | 326d2656b2f852f64c43ab4932ebd0819ae6d5b9 | refs/heads/master | 2021-01-19T10:39:52.652546 | 2017-04-25T15:59:14 | 2017-04-25T15:59:14 | 87,889,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,241 | py | LeetCode_2.py | # https://leetcode.com/problems/add-two-numbers/#/description
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def addTwoNumbers(self, l1, l2):
"""
:type l1: ListNode
:type l2: Li... |
d1d97c8e9a217b103a54831d57caa48fbcd702b5 | e4eae19d1a570d0611abea581be5f15ec1725cdc | /code/idac/blobdet/simplethres_blobdetector.py | 23957b8f55d656ec74a37c43b9905695701f311e | [] | no_license | antecede/MCC-trap | 714e9587e427d34922eaed635b6d1c65f72c8d05 | 061459f31bd90e7a28785371f3ad97d2d3ad2c0b | refs/heads/master | 2023-02-11T12:45:41.803522 | 2021-01-06T19:47:39 | 2021-01-06T19:47:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,023 | py | simplethres_blobdetector.py | import cv2
import numpy as np
from idac.objectOfInterrest import ObjectOfInterrest
from idac.blobdet.blob_detector import Blobdetector
#Reference simple - https://docs.opencv.org/3.4/d7/d4d/tutorial_py_thresholding.html
#Last accessed 17/12 - 2019
class SimpleThresBlobDetector(Blobdetector):
def __init__(self, co... |
f81145bac38a637bddaeaaefc9d9fda0b2fe2181 | 9100f5b41b2a31e2c0ba456e279e499205098cb9 | /app/authors/api/serializers.py | f0b74fbebc003b6c759b872fe05c416ab058a5f8 | [] | no_license | denisotree/vzor | 5804fe88739e472d859b91070df57a142130d0d7 | 026570c84d848329f35ebf29584865445dd48f27 | refs/heads/master | 2022-12-11T15:32:20.083815 | 2019-07-08T12:00:37 | 2019-07-08T12:00:37 | 187,483,831 | 0 | 0 | null | 2022-12-08T03:02:58 | 2019-05-19T13:59:56 | JavaScript | UTF-8 | Python | false | false | 378 | py | serializers.py | from rest_framework import serializers
from authors.models import Author
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = Author
fields = (
'id',
'username',
'first_name',
'last_name',
'email',
'phone',
... |
94eea90d068e68418457e73d9c12c589beef22b3 | c028a9d2c2b75dae6aacae5209ed9da9d1e437b7 | /week8/codingbat/string2/3.py | f6c32c612714aa8c9a80eb32171befd1340eb75c | [] | no_license | danakendybayeva/WebDev2020 | be0fd39754d282922067a275601c8d13f1a714eb | b1e21721e0695b9a92016d49f27513a442c22b06 | refs/heads/master | 2022-03-26T08:08:18.533166 | 2020-05-01T10:22:39 | 2020-05-01T10:22:39 | 236,327,101 | 0 | 1 | null | 2022-03-02T08:13:29 | 2020-01-26T14:55:21 | Python | UTF-8 | Python | false | false | 281 | py | 3.py | def cat_dog(str):
cat = 0
dog = 0
for i in range(len(str)-2):
if str[i] == "c" and str[i+1] == "a" and str[i+2] == "t":
cat += 1
elif str[i] == "d" and str[i+1] == "o" and str[i+2] == "g":
dog += 1
if cat == dog:
return True
else:
return False |
bfe4e7c8b5566e2860aa430f94c8a30e3d77f065 | cc834d0bed84ddde78014b9df2e4c68aec8efccb | /1697.백준_숨박꼭질.py | 8285d341bf2249e07a0eeff92cdf8d3b41a010d9 | [] | no_license | Namujjigi/study_problem_solving | deffd431128add78fe0c2dc31a9b9aeeccd253da | c3c5c93f2c153a76a3376e202981aed4ec20f577 | refs/heads/master | 2023-04-23T19:12:53.309679 | 2021-05-15T12:08:10 | 2021-05-15T12:08:10 | 330,672,597 | 0 | 1 | null | 2023-04-30T05:37:39 | 2021-01-18T13:20:11 | Python | UTF-8 | Python | false | false | 605 | py | 1697.백준_숨박꼭질.py | from collections import deque
def backtrack(s):
Q = deque()
Q.append(s)
while Q:
v = Q.popleft()
if v == M:
return visit[v]
if v * 2 <= 100000 and visit[v * 2] == 0:
visit[v * 2] = visit[v] + 1
Q.append(v * 2)
if v + 1 <= 100000 and visit[... |
e84f57975b5b394dc47d7a1eac3b8d3d4b16736c | 4e73e7bd8a71585b684e43265f1d742ecef474ee | /GeneticAlgh/heuristic_calculation/evaluation/evaluation.py | 3baaa502c4a14a5e1cbbf8a566415e93aa887344 | [] | no_license | Dav2015/Genetic_Algorithm__CV__ | 81f08a47a5c50d17e28b0d04f1928e35695102d0 | d399faa138797e51e0dd25f9719a30aab43b0f9d | refs/heads/master | 2020-04-10T10:10:47.675429 | 2019-01-15T11:24:36 | 2019-01-15T11:24:36 | 160,957,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py | evaluation.py | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 27 13:22:32 2018
@author: davidcamara
"""
class Evaluation(object):
''''Very important!
Use this Interface for implement the heuristic to drive the problem
until a solution
'''
def heuristic(self,pop):
''''Needs to return a bool'... |
6aa776676f12b75c9b1ef6d82ed954f42ce9a967 | 09c240918b768fe080a2cc28d9373755bae91f5b | /Average Grades.py | f28d65e36ec65b5426f18405fd27c986aa961aa8 | [] | no_license | CKanja/pythonTasks | cbea53a71a07bae52297ae8c51d82556c19dbbc0 | 187155db9e674524e73977872ba093541a9e46f5 | refs/heads/main | 2023-08-29T23:07:54.869566 | 2021-09-27T15:11:31 | 2021-09-27T15:11:31 | 406,515,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py | Average Grades.py | no_of_students = int(input("Enter number of students in class: "))
sum=0
for i in range(no_of_students):
grade = input("Enter student grade: ")
if str(grade).isdigit():
sum+=int(grade)
else:
print("Input numbers only")
continue
average = sum/no_of_students
print("The class average... |
30cae92ec61426b21ab28225c99b07ac23c0373d | 69402ebb1376f3b1b1ddd8fced81f20843224e8b | /product/ERP5Type/mixin/guardable.py | a01d775e865b3986453af80bd469a261b83385e0 | [] | no_license | patilswapnilv/erp5 | 791f8e5364fb1947842ff8ba137c73ee2b21fe6b | 1832ca00369f9deca9261a9bf487561e4df8c400 | refs/heads/master | 2023-09-01T13:16:55.336647 | 2023-08-28T19:48:59 | 2023-08-28T19:48:59 | 15,673,404 | 0 | 0 | null | 2023-09-14T19:16:31 | 2014-01-06T12:27:23 | JavaScript | UTF-8 | Python | false | false | 3,944 | py | guardable.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
# Copyright (c) 2021 Nexedi SARL and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public ... |
189a8aedd1bd9bb41785d8e9122c795032fa381f | 7aefce10739f32695918238a4bd259625f3c9c76 | /ScrapNews.py | cedf10f5a1e4ee863b45962583ed6a8ad9045bdc | [] | no_license | willy9913/Scrap | 69dd3bb2685215fa2a17e4f8568117f75a6626df | f725901d264da3f822fa3143f353f3e8587e24c1 | refs/heads/master | 2022-12-11T20:14:18.363647 | 2018-11-20T10:40:22 | 2018-11-20T10:40:22 | 158,357,654 | 0 | 0 | null | 2022-12-08T02:27:19 | 2018-11-20T08:44:08 | Python | UTF-8 | Python | false | false | 1,360 | py | ScrapNews.py | from lxml import html
import requests
login_url = 'http://utdpmidkijakarta.or.id/publikasi/berita'
session_requests = requests.session()
result = session_requests.get(login_url)
htmlpage = html.fromstring(result.text)
#values to jsonify
class News:
storedNewsTitles = []
storedNewsDates = []
storedNewsPho... |
a71679fc2f5c14894dd555e3e90ffbf9523c1921 | f5f7cf94953ff93b10b26740e0792a3ca54551a6 | /hr_linkedin_erpify/models/hr_job.py | ab26ed19bd000e989d3c2266dc68aaebef78fb37 | [] | no_license | solutionfounder/dashboard_kslsit13 | 2c248b86c5a63c3ad00bbc81b5d59325cafb397b | a8579afbe7a35a8067ebdca3c2119b6809612578 | refs/heads/master | 2022-11-06T17:20:56.312269 | 2020-06-16T10:45:31 | 2020-06-16T10:45:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,571 | py | hr_job.py | # -*- coding: utf-8 -*-
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError, Warning
class SocialAccount(models.Model):
_inherit = 'social.account'
use_for_job_posting_erpify = fields.Boolean('Use for job posting?')
class HrJobShare(models.Model):
_inherit = 'hr.job'
... |
3f0b294c5a35ed309a89dd19939943011d5aa3d7 | 0547c3ebab814e3fdf2616ae63f8f6c87a0ff6c5 | /478.generate-random-point-in-a-circle.py | faf8f3dc89c0d600532352e1c9110f93740c15e6 | [] | no_license | livepo/lc | b8792d2b999780af5d5ef3b6050d71170a272ca6 | 605d19be15ece90aaf09b994098716f3dd84eb6a | refs/heads/master | 2020-05-15T03:57:15.367240 | 2019-07-30T03:11:46 | 2019-07-30T03:11:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | 478.generate-random-point-in-a-circle.py | class Solution(object):
def __init__(self, radius, x_center, y_center):
"""
:type radius: float
:type x_center: float
:type y_center: float
"""
def randPoint(self):
"""
:rtype: List[float]
"""
# Your Solution object will be in... |
98c02364ffbefbf906fab124cdb0d572459a7f16 | 190872813ab160c36cbe880a59c18cf1aa3a4188 | /main_program.py | f42ca1650ab7e7a3d2f7a440bf5319dc42329743 | [] | no_license | hotshotjosh/superalienassault | afe6a05cf0e56792022c4b063ec70aececd1f77c | e40700e863ec03e2be3fc049c34fb905fd2817ab | refs/heads/master | 2018-12-29T06:29:03.180642 | 2015-08-20T13:59:54 | 2015-08-20T13:59:54 | 40,721,051 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,526 | py | main_program.py | """
FINAL LAB Josh Thomas
'Super Alien Assault' *
programarcadegames.com
Game Art provided by Kenney @ http://kenney.nl
Soundtrack provided by Beardmont @ https://soundcloud.com/beardmont
"""
import random
import pygame
from pygame.sprite import Group, GroupSingle, groupcollide
import constants
import levels
from play... |
a4b16992a9292e293020e300872bac432e8d49ff | 397b8102ff98901bd8ef5c9b70756cd4f9bd51e1 | /delta_debug.py | 12386e7620123bd67795f798e49d31d4600d8b60 | [] | no_license | fuellee/udacity_debugging | 764eb1dfc5c7a9f2ecc7ffd0a62ccbb407f32dc9 | df3420a64f2dfb262152698c2a2ad25e7ba15517 | refs/heads/master | 2018-12-29T08:55:06.256117 | 2013-10-12T13:25:01 | 2013-10-12T13:25:01 | 13,155,288 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,086 | py | delta_debug.py | import re
test_count = 0
def test(input):
global test_count
test_count += 1
print test_count,input, len(input)
if re.search("<SELECT[^>]*>", input) >= 0:
return "FAIL"
else:
return "PASS"
def ddmin(input):
# assert test(input) == "FAIL"
n = 2 # Ini... |
88f919e6bb2f715003634037891e3b4a1a4d1943 | 34b86b48eb3302a4043cdf6a250919167eaa816d | /rank_k_bfgs.py | f2f8ec4e3e10f4cd8f2636c1eee322c1a0957b1c | [] | no_license | eickenberg/fbg_code | 96d422d700cdbfc7cf83b5c57768a736d1009b7c | 057069c34277b89078cb4a0b05fd7aa90f7a62fa | refs/heads/master | 2016-09-05T23:09:04.003620 | 2013-11-26T15:52:46 | 2013-11-26T15:52:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,608 | py | rank_k_bfgs.py | """Simple implementation of a rank k solver for the problem
.5 * ||XUV.T - Y|| ** 2 + .5 * alpha * (||U|| ** 2 + ||V|| ** 2)
"""
import numpy as np
import numexpr as ne
from scipy.optimize import fmin_l_bfgs_b # XXX better than bfgs
from sklearn.linear_model import Ridge
from scipy.sparse.linalg import svds
import ... |
cb6e88266861519a7d311213fc44efa2b29c74a2 | b444a54fe761f5c5c0e2c59256a44e5725a407d7 | /nodes/yawController.py | 1cd3f969f4b7fc093b570d5321cf55b3bb457ee0 | [] | no_license | RHochdahl/fav_control | 0a22ba9b346763483a56f8736fa584b8749d45e7 | 011c0de9d35b253afdbb9518a291bc4f6ea6dd02 | refs/heads/main | 2023-02-26T10:54:39.324406 | 2021-02-01T14:26:53 | 2021-02-01T14:26:53 | 321,180,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,400 | py | yawController.py | #!/usr/bin/env python
PACKAGE = 'fav_control'
import roslib;roslib.load_manifest(PACKAGE)
import rospy
from dynamic_reconfigure.server import Server
from fav_control.cfg import YawControlConfig
import tf
import numpy as np
import threading
import math
from std_msgs.msg import Float64
from std_msgs.msg import Bool
f... |
f4f0d9c80e73c6708bbf7b63badadd3649616272 | f87df9e83548f359cf47a63c72a28f90e80c07f4 | /main.py | 1ab00aeb0d911edad1f40bc3410024cc91dbefab | [] | no_license | Lehman3D/Text_to_translate_to_speech | dc788c8883c2347d48585480da6848094ea138f5 | 61b8b2633846e65687e921ec357aeb12eb0ff059 | refs/heads/main | 2023-02-14T17:53:51.300567 | 2021-01-14T17:32:50 | 2021-01-14T17:32:50 | 329,686,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,008 | py | main.py | import json
from ibm_watson import LanguageTranslatorV3
from ibm_watson import TextToSpeechV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
import simpleaudio as sa
def main():
translator_apikey = "enter_api_key"
text_to_speech_apikey = "enter_api_key"
translator_url = "enter_ur... |
448a496d6cf183fe73cf62e90b39b8f5e925a6f8 | cc1d44cf04e5b2b15bb296a434aad4ae4bcfc4be | /python3/qr/zbarlight_test.py | 5944e63c9ba7fb774948ce49dce2fe4de1a416f1 | [] | no_license | ericosur/ericosur-snippet | dda2200546b13fb9b84632d115a0f4ca5e3d5c47 | 0309eeb614612f9a35843e2f45f4080ae03eaa81 | refs/heads/main | 2023-08-08T04:54:05.907435 | 2023-07-25T06:04:01 | 2023-07-25T06:04:01 | 23,057,196 | 2 | 1 | null | 2022-08-31T09:55:19 | 2014-08-18T03:18:52 | Perl | UTF-8 | Python | false | false | 864 | py | zbarlight_test.py | #!/usr/bin/env python3
# coding: utf-8
'''
apt-get install libzbar-dev
pip install zbarlight
I do not recomment use this module to decode qrcode.
'''
import sys
from PIL import Image
import common
try:
import zbarlight
except ImportError:
print('need to install zbarligt (python) and libzbar-dev')
sys.exi... |
4fed9fd49dff79dcea8ceb1346d5a99395561aa6 | 07ce7ac04fc51ef22d55fd30767deb331d5fbd93 | /BackendTeologia/appTeologia/migrations/0002_alter_turma_modulo.py | 01153b245cd4b8f15f8cb55111d30e5303739f7d | [] | no_license | wilamyA/backendTeologia | a0658708951a4dd8a915e61523ac4b58fc76cb3c | bd407b1adfc7468c423f3159acfe8cf37c0884c1 | refs/heads/master | 2023-06-12T01:19:28.290250 | 2021-07-07T00:46:10 | 2021-07-07T00:46:10 | 383,632,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | 0002_alter_turma_modulo.py | # Generated by Django 3.2.5 on 2021-07-06 01:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('appTeologia', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='turma',
name='modulo',
... |
d0330ed3ac3802676d872760b43ebc63cce7baaa | b99bc3a8fb989f2069d0c012addb86918a4de62a | /Week 8/density_improved.py | f1dc4289fe630c11705b8faccd38c6faaf6e44dd | [] | no_license | haggbart/IN1900 | e8f2f32b4b2a1f4f7c59adb0157e2d6267c3b032 | 7df2ba206ecf01586258a4d4afd9a816c0d97e49 | refs/heads/master | 2021-08-17T04:08:01.089370 | 2017-11-20T19:45:19 | 2017-11-20T19:45:19 | 104,297,926 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | density_improved.py |
def substance(fil):
infile = open(file, 'r')
densities = {}
for line in infile:
words = line.split()
key = " ".join(words[:-1])
density = float(words[-1])
densities[key] = density
infile.close()
return densities
def substance2(file):
infile = open(file, 'r')
... |
973990b66691ab93ed06161aceeac8aeb6c39753 | 2fcdfb90851dfdcaafeb3ea5c36405c4424d1f39 | /old_oa/test_scripts/test_fwgl.py | 8743849465f4b96e085a0c2c0909d9a218c014e9 | [] | no_license | GuoQin8284/OA_auto | 59dc27ad3305ecef6a19ddd3a8f16f6e286b4279 | b618df611c79da2e2ccaa9ec5d8e6c497979bc51 | refs/heads/master | 2023-06-11T14:01:26.811703 | 2021-07-10T09:45:38 | 2021-07-10T09:45:38 | 311,923,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,552 | py | test_fwgl.py | import json
from unittest.case import TestCase
from parameterized import parameterized
from config import BASE_HOST, BASE_DIR
from driver.action import Action
from driver.data_analysis import data_analysis
from driver.setup_driver import Driver
from page.fwgl.fw_cld import FWCLD_Proxy
from page.fwgl.fw_blz import BLZ... |
02b6af472528667e0c941e9bc728e3f9e05cbad2 | 6ffc0c68d07eaf1bd9eec48cb66abbf631f689c8 | /hypergan/modules/residual.py | 6cbe60a2c8bf4c44cc343b874b9afead5826dad7 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | JasonMcKinlay/HyperGAN | c68f805e689266ca17b774d68daa7b287a4c35cb | 291ddccda847e4f4ccb273bb26121a0a0d738164 | refs/heads/master | 2023-07-29T15:21:03.174593 | 2021-01-24T21:17:54 | 2021-01-24T21:17:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | residual.py | import torch.nn as nn
class Residual(nn.Module):
def __init__(self, channels, filter=3, stride=1, padding=1, activation=nn.ReLU):
super(Residual, self).__init__()
self.conv = nn.Conv2d(channels, channels, filter, stride, padding)
self.activation = activation()
def forward(self, x):
... |
5e2fe94fad700ee382ec8fe76e1b95770f806e53 | 9fdf1cff9942f3465ab80ce518b1fd52b632b7c9 | /examples/deep/monk2_deep_test.py | fd2a03e4bac92dad416c1b62a3570fe9d2f19f43 | [
"MIT"
] | permissive | alessandrocuda/ISANet | 46d3163824e139f4d34cc21bbc3bf1a5247fd871 | d5397aa0bc7071e9f7e0e177f1ea0a3599966b38 | refs/heads/master | 2023-03-17T00:05:25.899666 | 2023-03-14T17:24:25 | 2023-03-14T17:24:25 | 240,105,341 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,207 | py | monk2_deep_test.py | import sys
from os import path
sys.path.insert(0, "../")
sys.path.insert(0, "./")
from isanet.model import Mlp
from isanet.optimizer import SGD
from isanet.datasets.monk import load_monk
from isanet.utils.model_utils import printMSE, printAcc, plotHistory
import numpy as np
import time
print("Load Monk DataSet")
X_tr... |
5fb844a143170f986a1e5cf9cb3fdc0fc9e6c287 | 5fd5f3617402f684997f23358fd280b20c714244 | /befunge/pyfunge/funge/fp/fp_HRTI.py | 8a7417ddda417c56b42298b85ce0483247cd8333 | [] | no_license | mjuvekar7/the-holey-junkyard | 3012d20bff03dd21494e1a1da9c866413623c90b | ae2ac8d30509585bdfad84cc04e07965c55955f8 | refs/heads/master | 2021-01-17T11:09:07.474956 | 2018-12-26T07:27:06 | 2018-12-26T07:27:06 | 29,530,635 | 4 | 2 | null | 2016-04-05T16:05:38 | 2015-01-20T13:19:51 | HTML | UTF-8 | Python | false | false | 1,510 | py | fp_HRTI.py | from funge.fingerprint import Fingerprint
import time
class HRTI(Fingerprint):
'High-Resolution Timer Interface'
API = 'PyFunge v2'
ID = 0x48525449
def init(self, ip):
Fingerprint.init(self, ip)
try:
self.resolution = ip.program.HRTI_resolution
except AttributeEr... |
7290e1395b079af694a494bbd215fd478c81f3e9 | 6076b17aae54691a0f58aed9b1a511ff3566d171 | /script/make_transmission.py | 69e45b22af2368707f79bba25c0867fce58b7b91 | [] | no_license | hkjpotato/centos_time_demo | 256771ecd13de329ae858bd631b7c34e4a5debd1 | 7c6c6cbe102f637274dd5deaac484f98f3086714 | refs/heads/master | 2021-01-20T16:58:53.548807 | 2017-02-22T21:08:11 | 2017-02-22T21:08:11 | 82,846,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,340 | py | make_transmission.py | import json
trans_fname = "./nyc_transmission.json"
with open(trans_fname, 'r') as infile:
trans_data = json.load(infile)
vis_data = {}
vis_data['nodes'] = []
vis_data['links'] = []
for key, value in trans_data.iteritems():
if value['object'] == 't_node':
try:
del value['id']
... |
e60d4acf2990387b4d6167ca291cf64f617243e2 | 586feaf60487850be7c3c127fcfaf93e983b70a2 | /website-analysis/auto_website_scraper/intelligence/personal/logic.py | cf5e7bad48851e39de3b215a77a6d646d388b080 | [] | no_license | jithinsayone/automated-scraper | 1a46cda7ad78774050229cfb3ecaa02effd515d0 | 25dc13c038d005d4a63d8b87900c83cb3c9a51b0 | refs/heads/master | 2021-01-13T05:54:18.232524 | 2017-09-28T07:48:02 | 2017-09-28T07:48:02 | 94,976,078 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,436 | py | logic.py | import re
from bs4 import BeautifulSoup
from ..phone_number.logic import PhoneParser
from ..email.logic import EmailParser
from ..utils.utils import get_text
class PersonalParser(object):
"""
Every response passes through this logic until get a required data
"""
def __init__(self, response):
... |
a5f2a617adf85d0ace9a7766841ac7890c50a41e | 78144baee82268a550400bbdb8c68de524adc68f | /Production/python/Autumn18/StealthSYY_2t6j_mStop-400_mSo-100_TuneCP2_13TeV-madgraphMLM-pythia8_cff.py | f7229b90ecff9b80a277b49446e688ed8a7645ea | [] | no_license | tklijnsma/TreeMaker | e6989c03189b849aff2007bad22e2bfc6922a244 | 248f2c04cc690ef2e2202b452d6f52837c4c08e5 | refs/heads/Run2_2017 | 2023-05-26T23:03:42.512963 | 2020-05-12T18:44:15 | 2020-05-12T18:44:15 | 263,960,056 | 1 | 2 | null | 2020-09-25T00:27:35 | 2020-05-14T15:57:20 | null | UTF-8 | Python | false | false | 13,080 | py | StealthSYY_2t6j_mStop-400_mSo-100_TuneCP2_13TeV-madgraphMLM-pythia8_cff.py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/mc/RunIIAutumn18Mi... |
d6a89e583e51afdc720fbbcf7d3038602d6773eb | 4d3400e624bd60343f608cf6b1ed6c4dbacf40bd | /clanclass.py | ee815d5c284a03921a9f2ab3989bba0bf7497ac2 | [] | no_license | t0efL/CRClanStats | 784ca05463a43e5eec3a76dfee51c80f6719acbc | 7a962826bd38287dbac60d997acb7c4f12cc0d07 | refs/heads/master | 2022-07-31T09:05:15.625879 | 2020-05-22T07:43:28 | 2020-05-22T07:43:28 | 264,431,445 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,695 | py | clanclass.py | # A module containing a class with all its methods and describing a clan.
import numpy as np
class CRClan:
"""Class describing the clan."""
def __init__(self, title):
"""
initialization of a dictionary containing all clan members
and information about them.
"""
... |
6afeeca1ddf1d230f2939a2d00b7c22d3c8c3925 | 3314ae5a547f91520bf387663d1272c64040ba14 | /constraintsolving/ConstraintParser.py | 312b0ac77e2697c982eb00dc82fc3000c834390a | [
"MIT"
] | permissive | thepalbi/codeql | 0ef7534626350bbff04e13df6623d3a2b5e81805 | a0b5e1c87c3fcca4c60ecf051238981d2e7dd594 | refs/heads/msr-propgraph | 2023-05-13T14:11:47.344460 | 2020-09-19T01:57:26 | 2020-09-19T01:57:26 | 289,783,777 | 1 | 0 | MIT | 2020-09-19T02:00:07 | 2020-08-23T23:31:10 | CodeQL | UTF-8 | Python | false | false | 164 | py | ConstraintParser.py | class ConstraintParser:
def __init__(self):
self.pattern = simpleArith.expr
def parse(self, expr):
return self.pattern.parseString(expr)
|
5855458af6d6d87ab4f231b7a6a03099194b03b3 | 895b0cfed27d9039f055e64353c70b7bc2a1c880 | /death_star/log.py | 1f43564cc4e53a6df97559ac442ede77c678b287 | [
"Apache-2.0"
] | permissive | 5l1v3r1/death-star | b59bb559523888f824535899af3d3a5a50308eed | fc3639400b88fc86a651e41f0b588cc45c86a90a | refs/heads/master | 2023-03-18T11:36:43.071267 | 2015-03-02T14:32:32 | 2015-03-02T14:32:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | log.py | import logging
def get_logger(name):
logger = logging.getLogger(name)
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG)
return logger
LOG = get_logger('DSG')
|
d23b84b537207c39450f9791d2c7b67e93226918 | 0ba2c3776618b5b8b76f4a23f21e9c6ad3f6e2e1 | /高级算法复习/ppt复习/2-3归并排序.py | 8c351d4ca4b47fa5369e51990a0553f09160be3f | [] | no_license | WangDongDong1234/python_code | 6dc5ce8210b1dcad7d57320c9e1946fd4b3fe302 | 6a785306a92d328a0d1427446ca773a9803d4cc0 | refs/heads/master | 2020-04-15T12:35:03.427589 | 2019-09-16T15:38:25 | 2019-09-16T15:38:25 | 164,681,323 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | 2-3归并排序.py | """
归并排序
"""
def merge(a,b):
c=[]
i=0
j=0
while i<len(a) and j<len(b):
if a[i]<b[j]:
c.append(a[i])
i+=1
elif a[i]>b[j]:
c.append(b[j])
j+=1
else:
c.append(a[i])
c.append(b[j])
i+=1
j... |
86c005fcfc5122236baa0888ab825e989a38dccd | d36e8cf36551b5227fb3f57ec5b3b3758479141e | /seatrans_api/reserva/models/Asiento.py | 492c0d46a410e473b7487a0d630e2bd04e4aff8e | [] | no_license | ASW-20171/seatrans | 59ae3183c98266ef718e648e9cd813ad111d65c2 | 7a3d1881de2c920f8becec5990ea4392cdd8f730 | refs/heads/master | 2021-06-19T22:10:17.007420 | 2017-06-28T15:53:22 | 2017-06-28T15:53:22 | 85,855,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | Asiento.py | from django.db import models
class Asiento(models.Model):
tipo_asiento = models.CharField(max_length=60)
descripcion = models.CharField(max_length=50)
costo = models.FloatField()
class Meta:
verbose_name = "Asiento"
verbose_name_plural = "Asientos"
def __str__(self):
ret... |
eada1cd5c4e69dea508f32fb146c458cf4719dde | 8fc3cbeee5028b14f0475fc386ae6c7ea28e39fb | /hello/migrations/0002_auto_20201223_1824.py | ca27143317a0f2395119296676957ced20df1208 | [
"MIT"
] | permissive | StafaH/jamm-bandit | 7c2de32f1199530ae4d19cf7b8a14ebb2c4cc6c2 | 3c489817acc5c9b4d86a283809d59569b07f53d7 | refs/heads/main | 2023-02-19T01:04:45.698142 | 2021-01-23T19:05:05 | 2021-01-23T19:05:05 | 304,456,383 | 2 | 2 | Apache-2.0 | 2020-11-28T20:07:01 | 2020-10-15T21:53:56 | Python | UTF-8 | Python | false | false | 1,854 | py | 0002_auto_20201223_1824.py | # Generated by Django 3.1.4 on 2020-12-23 23:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hello', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Arm',
fields=[
('uniform_yes... |
5abec377fb6d64be694a65087fd257d8289286c6 | 9dfa12a7a48db0f9dd81c4f83572154ba1e90fc4 | /UIOWA/CS1210/Lecture/puzzle2.py | 1f15381a44aab6abd7bbf0482aa3199ef9082e67 | [] | no_license | Cha-Euy-Sung/CS_Tutoring | ecea9ea8e6fb28ba7640b6b909f2a04c03b5f750 | f993a86b757f32bc03e219d4badf705e25458c51 | refs/heads/master | 2023-02-06T21:48:38.956829 | 2020-12-26T09:45:52 | 2020-12-26T09:45:52 | 272,037,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | puzzle2.py | def puzzle2(S):
L=S.split( )
countA = [len(x) for x in L if "a" in x]
return countA |
f09cb11bbaa32f49ea8174994f5e7658723ad53b | 9974fb852200e076582a8838d09a62ef130d3de3 | /ScrumHelper/projects/comments/migrations/0003_remove_comment_owner_usr.py | 8d8bb2fefd0a6f636d5655a32da0f027c2a7dff6 | [] | no_license | nalevi/project_django | 210178451fe09f4d21843b2c4a4c4e42a36664d4 | 7025283c082e1c211064a09f7a6ea3cd3bbbea4b | refs/heads/master | 2023-03-30T20:56:54.158779 | 2021-03-19T15:23:14 | 2021-03-19T15:23:14 | 222,523,375 | 0 | 0 | null | 2021-04-08T19:24:07 | 2019-11-18T19:06:12 | Python | UTF-8 | Python | false | false | 332 | py | 0003_remove_comment_owner_usr.py | # Generated by Django 3.0.2 on 2020-03-21 18:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('comments', '0002_comment_owner_usr'),
]
operations = [
migrations.RemoveField(
model_name='comment',
name='owner_usr',
... |
d2eae52c641efe44dff7a54210544fb5d5f25164 | 4402130386d8495e03c74e7aff53c9e8ae71e055 | /maflib.py | bb17654160e6f38e9a4980493664823646d7704d | [] | no_license | sddhrthrt/nectar | 2598371eb7e146c37947e7416067b829118dbfe5 | c8dd81f2cd921226b2e63f65ebf12fbe6d461087 | refs/heads/master | 2021-01-18T14:53:22.787125 | 2013-04-12T07:22:15 | 2013-04-12T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,091 | py | maflib.py | # maflib.py -
#
# includes a set of common utilities for MAF
#
# Author: Feiyi Wang
# fwang2@mcnc.org
#
# Copyright (C) 2001
#
# $Id: maflib.py,v 1.1.1.1 2001/04/17 17:53:45 fwang2 Exp $
import asyncore
import string, os, stat,sys
from socket import *
def goodbye():
print "\n\n"
print '\t=========... |
703a29f8f904d6daf0ceadf956c0a5d77937c60f | 33024bed3b4b122fd08b67ee306ac019db8f1ad5 | /exemplos/emprestimo.py | 5a799b17eae3ba4733a113794110180aa462a243 | [] | no_license | maerli/biblioteca | 90cadcc0dee2c023e0235973bbca97c4ef48e534 | 1c5d1fab1d08b2e5d59ea617661c39b7f2e7904c | refs/heads/main | 2023-03-27T00:38:35.530011 | 2021-03-21T14:06:03 | 2021-03-21T14:06:03 | 278,336,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | emprestimo.py | import exemplos
from diff.autodiff import var,df,const
err = 0.01
f = lambda pv,i,n: pv*(i/(1 - (1/(1 + i)**n))) - 289.62
pv = var(10)
i = const(4.20297/100)
n = const(6)
max_iter = 1000
for iter in range(max_iter):
y = f(pv.a,i.a,n.a)
dy = df(f,pv,i,n)
pv = var(pv - y/dy)
if abs(y) <= err:
... |
25d68acfa2446e507bcd025fb5c629db41bccf90 | eb827d7993b146cf507b57a45e420fffdf641eef | /camps/team_camp2020/day2/k.py | 15a83f2b9f205f26898c18fb681339b37a4cff44 | [] | no_license | khbminus/code2020 | dfdbcae71d61d03d4457aad47ff7d4136e6fcc1e | a0d2230b0905df79ba78cb98353f4ba03f16e8b0 | refs/heads/master | 2023-07-16T16:08:20.629283 | 2021-08-29T20:35:14 | 2021-08-29T20:35:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51 | py | k.py | a1 = -148379
d = 10074
print(a1 + int(input()) * d) |
2a0be128188648bc2bd433b858d98e93114fcf86 | d68f7e3613bc24acc7acf922948185a5a395dda2 | /eternal-face/morph_face.py | 49134adc8e4e08385b1a12d848d0f144c51e6363 | [] | no_license | ssgalitsky/eternal-face | 11672ac7548a83d62233de11438c820035707465 | 7cf72d822f7c1c3dbbc725299ea84ed43cdadeeb | refs/heads/master | 2020-06-01T10:28:01.877754 | 2019-01-21T18:30:30 | 2019-01-21T18:30:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,085 | py | morph_face.py | """
morph_face.py
Performs averaging, morphing, and texturizing operations on input faces.
"""
import os
import random
import cv2
import numpy as np
from face import Face
from warp import triangle_warp
class MorphFace(Face):
"""
Performs averaging, morphing, and texturizing operations on input faces.
A... |
cb0643e183c08798ca47190a5be383c3160e8e2c | fa813a925f0941c0957aeb6c9d9796029c993a97 | /PyCodes/barycentric_optimizer_configuration.py | 37acabe3a70d86607c0e51cfc19ba80bf59d809c | [] | no_license | mikeysflix/ClusterAnalysis | a1185a0dacc8ef321c7fb54bab35a88641d59b55 | 68f42881e5943d38b2a3810c4ddf5f169a9dc318 | refs/heads/master | 2023-07-24T14:48:12.073188 | 2021-09-12T08:29:20 | 2021-09-12T08:29:20 | 405,572,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37,328 | py | barycentric_optimizer_configuration.py | from coordinates_configuration import *
class BarycentricClusteringVisualizer(ClusterEvaluation):
def __init__(self, data, data_labels=None, distance_metric='euclidean', savedir=None):
super().__init__(data, data_labels, distance_metric, savedir)
self.rows_per_distance = np.arange(self.n, dtype=in... |
8a1f60c6f7ee89f56cd6cc4604dd015f108c3c00 | a82f6df2e1d89c212344e8cd9f91c663c82b7ca2 | /exts/serialize.py | fda68ed61708f6f6c618f1f80ae0dae5226654e3 | [] | no_license | lxngoddess5321/cloud | b32054e58d3b1c7b54c89850af1524a867fc2456 | c5d88f472f5f13afef103103bbaaad6238327d7e | refs/heads/master | 2022-04-17T13:05:05.822861 | 2019-12-29T10:44:37 | 2019-12-29T10:44:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,627 | py | serialize.py | """请求序列化
1. 兼容docker相关操作执行后返回结果为bytes情况
"""
import json
from datetime import datetime, date
from time import mktime
class CJsonEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime):
return obj.strftime('%Y-%m-%d %H:%M:%S')
elif isinstance(obj, date):
... |
c8bf626f27f2d459d47046b11774f57900c05cdb | c5363c6d5a26e39dc5fbd13fb7545c7dbedf1037 | /utilities/update_rain.py | 28852b89748b96c0d833738923e941500c16cb54 | [] | no_license | StaticReasons/convectionAnimation | fed8682742bb776a2400740196fe35a49332c8fb | 955f41459a341ed3d82be306a15a85b435b5b1f6 | refs/heads/master | 2022-12-11T22:08:55.893725 | 2020-07-10T10:55:50 | 2020-07-10T10:55:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,880 | py | update_rain.py | import numpy as np
import random as rn
from rain_droplet_class import rain_droplet
def combine_colors(bottom,top):
new = [0.,0.,0.,0.]
new[3] = 1. - (1.-top[3])*(1.-bottom[3])
if new[3] != 0.:
for k in xrange(3):
new[k] = top[k]*top[3]/new[3] + bottom[k]*bottom[3]*(1.-top[3])/n... |
b41fdb7f2cac55dfe28989dc11646670f1f3cab0 | 1e84a85c33e2990f94cb8b21c36e952c5dd73edc | /outliers/outlier_cleaner.py | ef69c3796ba574099dd0b987cf3c988239b36c78 | [] | no_license | lalith77/udacity-ML | 4259bb38d701282519923cf672e914b59fda7ed3 | a420a08580d6310c561e8abaa0eb221c134a0259 | refs/heads/master | 2022-06-26T11:39:43.149641 | 2020-01-09T22:31:35 | 2020-01-09T22:31:35 | 229,450,098 | 0 | 0 | null | 2022-06-21T23:55:51 | 2019-12-21T15:57:07 | DIGITAL Command Language | UTF-8 | Python | false | false | 1,184 | py | outlier_cleaner.py | #!/usr/bin/python
def outlierCleaner(predictions, ages, net_worths):
"""
Clean away the 10% of points that have the largest
residual errors (difference between the prediction
and the actual net worth).
Return a list of tuples named cleaned_data where
each tuple is of the f... |
5b717b838133e2ddc6ca5b1dad7c446904f02767 | f6e594d6241c623cb241c764630cca9d6b231b84 | /mefit.py | 338745a644ce563bc8d1193e9bd1804d1dbb1608 | [] | no_license | Varunpm17/Mefit | 5f63bf4dfe4c6bbacfe1666944c808ca542eba27 | 129a1b1fb7975ca1b355a22609ed3eb5911397e2 | refs/heads/master | 2022-11-17T13:31:54.989167 | 2020-07-19T02:04:59 | 2020-07-19T02:04:59 | 280,491,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,234 | py | mefit.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 16 13:53:53 2020
@author: gauravmohan
"""
from collections import defaultdict
import pandas as pd
import os
count = 0
def route():
global count
rootdir = os.getcwd()
for subdir, dirs, files in os.walk(rootdir):
for file i... |
0f6ce02cc0a6792a696ece925decf5246345df62 | db91105b98bcc586bfbae9dd75b4a39fb2aed145 | /src/Chapters/ch3p/problem15.py | ea8369a50e7cc020430e58a648c2c52e01631840 | [] | no_license | rselwyn/FunctionalProgramming2015 | c9e500bb81dcdde5ebadb80e3dcb704dce9eedd2 | 01c84d8ddd690185ba39f5d7d35554b672f574ad | refs/heads/master | 2021-01-01T05:31:31.184890 | 2015-12-20T20:07:30 | 2015-12-20T20:07:30 | 41,965,996 | 0 | 0 | null | 2015-12-15T21:05:01 | 2015-09-05T15:28:43 | Python | UTF-8 | Python | false | false | 361 | py | problem15.py |
def problem16():
hm = int(input("which fibonnaci number do you want to print?"))
tnum1 = 0
tnum2 = 1
store = 0
#get the number of fibonnaci numbers, cast it to an int because we cant have
#a loop iterate 1.23 times
for i in range(hm):
store = tnum2
tnum2 += tnum1
... |
20a79e9584a88a7b827bfd761433582bfa0ab021 | 490d52f91632f073443a93da34cbace8fd9a0808 | /Python game - Captain Mathematica/libraries/spyral/rect.py | be6d48cbdc9ba9d9bb940c5620584d250ea247dc | [] | no_license | sychen41/Coursework-Projects | 8a3e15595d315b87595f1c2187bd94fb6b208629 | 9bade7261e0cbceb3f4a41bcfd62eec25b63714e | refs/heads/master | 2021-06-11T11:03:30.140264 | 2016-11-22T20:18:30 | 2016-11-22T20:18:30 | 72,362,903 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,476 | py | rect.py | """
Rects are a convenience class for managing rectangular regions.
"""
import pygame
import spyral
class Rect(object):
"""
Rect represents a rectangle and provides some useful features. Rects can
be specified 3 ways in the constructor:
#. Four numbers, ``x``, ``y``, ``width``, ``height``
#. Two... |
b696212babc720ae6929223f30651a29d56ea313 | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/h2o/utils/csv/dialects.py | 869f98fc814fedbb7213c23795df14c691bde342 | [
"Apache-2.0"
] | permissive | h2oai/h2o-3 | 919019a8f297eec676011a9cfd2cc2d97891ce14 | d817ab90c8c47f6787604a0b9639b66234158228 | refs/heads/master | 2023-08-17T18:50:17.732191 | 2023-08-17T16:44:42 | 2023-08-17T16:44:42 | 17,371,412 | 6,872 | 2,345 | Apache-2.0 | 2023-09-14T18:05:40 | 2014-03-03T16:08:07 | Jupyter Notebook | UTF-8 | Python | false | false | 111 | py | dialects.py | # dialects.py - backport unix_dialect
import csv
__all__ = ['unix_dialect']
unix_dialect = csv.unix_dialect
|
ab71e77c59c18071879b2b1e0160614605c5cd75 | 5e557e821a11672e0f1ff4b91559df9499c79064 | /0205_문제풀이1/연습장.py | 1458387190b5896e8cac95737f55667b08d7d384 | [] | no_license | edukyumin/TIL-Today_I_Learn | c946ee798c87df8b8341b1cf4df5559784972d2b | 5ac951f420bbf7fa038a1f6313138d92bb343f88 | refs/heads/master | 2022-11-21T08:13:24.394648 | 2020-07-23T10:26:07 | 2020-07-23T10:26:07 | 268,869,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | 연습장.py | for x in range(4-1,-1, -1):
print(x)
|
d32c72801d968d35deaa712856fa5dccffe29f25 | c5d553e68de3d5c730f5fe2550209de759eabc8c | /하샤드의 수.py | 5dcbb07cf208b8609e8a4e9679abb81ad5fcff58 | [] | no_license | KimMooHyeon/Algorithm-Studying | 6bb23b971b0c46c35f4cdde133148f2c5cfaa0f4 | e4417aadf209fd22f960239623bed542744fd374 | refs/heads/master | 2023-08-08T02:28:02.460332 | 2023-07-15T14:22:53 | 2023-07-15T14:22:53 | 198,966,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | 하샤드의 수.py | def solution(x):
answer = False
now_sum=0
now_x=x
while True:
if x<10 :
now_sum+=x
break
else:
now_sum+=x%10
x=x//10
if now_x%now_sum ==0:
answer = True
print(now_sum)
ret... |
8d09a372c57d6ed538800dbba426352b62552920 | e972a3db507312c58a7637a706464257e557725d | /controltowerlib/controltowerlib.py | c2548f58e5d10faa332916f7d3d2352c2e349569 | [
"MIT"
] | permissive | schubergphilis/controltowerlib | 5ddc6a9b6e02f19e914e636c71fee70031f40c09 | c92c0a50d7d6cb568a8e5660df4256a2976b5a4e | refs/heads/master | 2023-04-08T04:14:07.970825 | 2021-04-26T13:10:19 | 2021-04-26T13:10:19 | 328,966,855 | 5 | 0 | MIT | 2021-04-01T10:46:31 | 2021-01-12T11:34:30 | Python | UTF-8 | Python | false | false | 48,353 | py | controltowerlib.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: controltowerlib.py
#
# Copyright 2020 Costas Tyfoxylos
#
# 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... |
8e7ac03f9549ba81a9b565eaba3f5ca61c71146b | 047a1d705710f95a6280fc19009298314a9a0993 | /mysite/mysite/urls.py | 6224eabc28595cf37e9cf21dbbb694719eb06f17 | [] | no_license | wangshiyishi/mysite | 5d9d73e465a0a3c66b261dce9743f97ba6345e97 | 1185b10007473ccfa0b3625793d08181e9d5e234 | refs/heads/master | 2020-06-11T07:06:28.675151 | 2017-04-29T14:51:23 | 2017-04-29T14:51:23 | 75,738,407 | 2 | 0 | null | 2017-04-28T16:18:42 | 2016-12-06T14:22:04 | HTML | UTF-8 | Python | false | false | 894 | py | urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^$','blog.views.index',name ="index")... |
c81cd5987fe3daa395a58a828940e84bc5f9b450 | cb60fb037358efb03a686a6d934a6b3e732ca06e | /custom_components/lyric/__init__.py | 5188c6ad42ba88b08409004ede30e6625784853b | [
"MIT"
] | permissive | bramkragten/lyric | 6d3a447a6bb75c3d0f5a1ce86a519f78d407f8ee | ff25358054d6a2fa5855da9636d2e4d998e199c6 | refs/heads/master | 2021-06-22T21:04:32.976886 | 2021-03-03T23:17:17 | 2021-03-03T23:17:17 | 190,260,910 | 17 | 20 | MIT | 2021-03-03T23:17:18 | 2019-06-04T18:49:43 | Python | UTF-8 | Python | false | false | 7,231 | py | __init__.py | """
Support for Honeywell Lyric devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/lyric/
"""
import logging
import socket
import asyncio
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers impor... |
856c3b3e070e0cd9d35e5b6987c355aed1999e56 | 5d03fd4d1bf46e1b2a840f0b3fae80605c761453 | /day10.py | 16cfa6be10ac34c70e12a8addf1f13147daad936 | [] | no_license | kkarbowiak/advent-of-code-2015 | 7f2d6473b045c0ce05a7751fd6c93d49eefc725d | d3061d08a0d4c3c3c048a4abe7e4ad1cb151e45d | refs/heads/master | 2020-03-19T15:24:23.939196 | 2017-12-04T21:43:39 | 2017-12-04T21:43:39 | 136,669,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 746 | py | day10.py | def look_and_say(text):
result = ''
len = 0
char = text[0]
for ch in text:
if ch == char:
len += 1
else:
result += str(len)
result += char
len = 1
char = ch
result += str(len)
result += char
ret... |
1793127b9edc4c6ab70a73c8062df6a8faef16a3 | 14d940630ab365be939fc08d3d95b0a98789bae7 | /lab90_metodos_magicos.py | b1e0541306b68661d887a93dd11ff13f8540bb3b | [] | no_license | accolombini/python_completo | 1da6f58f0c57b978d70582d96dc12b80c2d5b8a8 | 935102173a1112273b09734392dca08d76e9c749 | refs/heads/master | 2023-01-09T07:51:15.494101 | 2020-10-11T23:39:08 | 2020-10-11T23:39:08 | 283,790,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,281 | py | lab90_metodos_magicos.py | """
POO -> Métodos Mágicos => métodos mágicos são todos os métodos que utilizam dunder.
Conhecemos: dunder init -> __init__( ) (nosso construtor)
dunder vem de double underline ou underscore
dunder repr -> __repr__ -> representação do objeto
dunder len -> __len__ -... |
872529deb5bb4920bdf573f1eb7a8ee833c939c9 | 532c8d4be19c86a5c144335323c2b434776013a7 | /ColClassify.py | 99a660ef246d1d3d2df967cdc0dc38e2925984f0 | [
"MIT"
] | permissive | petrichorz/TestSheet | f050b173307e19833e1b45755dd72e6e3edf0e8a | 4f494278bbf5172561379a4762705738ceed4f43 | refs/heads/master | 2020-09-20T07:31:55.641982 | 2019-12-13T12:46:48 | 2019-12-13T12:46:48 | 224,412,055 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,632 | py | ColClassify.py | import FuzzyMatch as fm
import pandas as pd
import numpy as np
import re
def remove_punctuation(str):
filter_relu = re.compile(u"[^↓↑μ.,\^/\\a-zA-Z0-9\u4e00-\u9fa5\uFF01-\uFF64\u3000-\u303F\uFE10-\uFE1F]")
#先把字符串转为unicode编码
str = filter_relu.sub('',str)
return str
def filter_list(strlist):
filtere... |
c7028c97aa3e7f8be5aceffd27b7270b0528db3d | c35a7c2e503252a69b2d219ef40a4ee3978a48c8 | /practical2/q05_find_month_days.py | 05e59e08d310fac4790bb38128ac60e5763af6e4 | [] | no_license | LXSkyhawk/cp2015 | dc0d5f9c62b6874c24e733348c2d7d1c863cd8d6 | 078fbaa1093ffbb25adf391db60c9bd99b9f5f77 | refs/heads/master | 2016-09-10T18:46:00.842155 | 2015-02-11T14:18:44 | 2015-02-11T14:18:44 | 29,633,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 745 | py | q05_find_month_days.py | def in_check(x):
check = False
while not check:
month_year = input("Enter %s in integer form: " % x)
try:
return int(month_year)
check = True
except ValueError:
print("Integers only!")
month = in_check("month")
year = in_check("year")
months = ["Janu... |
f964d25a747a0520a5381ff240d0d443c86b01f2 | 68a25bfebcae79226b8f43a7432f30d7000e649b | /pre-processing/BERT/bert2.py | ede3b9fb9dbee25b6eedacd4efa7b4a99f04533e | [] | no_license | blenature/toxic_comments_classification | 40f12fbaef2e735bad54be6e4689a0eddce6eb9f | 68d40c16198841a99ee1a387772efdf0395a4bcd | refs/heads/main | 2023-03-22T20:27:50.885091 | 2021-01-12T13:32:16 | 2021-01-12T13:32:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,351 | py | bert2.py | import pandas as pd
import numpy as np
import os
import tensorflow as tf
from tensorflow.keras.callbacks import ModelCheckpoint
from tqdm import *
from transformers import BertTokenizer, TFBertForSequenceClassification
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.metrics import AUC, Accuracy
from ... |
b01d950a9350c59af2db517cf49b9bf99dddecb4 | 032a59902e47f6843ac9c76f6e27eb1d4a78c27d | /scripts/python/ingest/ingest_config.py | cf07a3314db3d718ce0eddc3aa718b8aec8cae97 | [
"Apache-2.0"
] | permissive | OSADP/Pikalert-Vehicle-Data-Translator- | 17411c602879eb4fb080201973b4a966f9405a4b | 295da604408f6f13af0301b55476a81311459386 | refs/heads/master | 2021-03-27T12:02:18.535636 | 2017-04-03T16:09:38 | 2017-04-03T16:09:38 | 25,056,408 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,497 | py | ingest_config.py | #!/usr/bin/env python
#
# Domain configuration file for defining path variables. This one is
# for the CONUS region. If this file is executed as main(), then a list
# of top-level directories are created under System_root_dir.
#
#----------------------------------------------------------------------
#
#
import os
impo... |
db1603a2546075d3e1b60172f544a2951244fcec | 0bb140fe09cd9f3c30267c64ea03eb838a61797b | /ReadAttribute.py | abd14f81a1e21797e872d39dc197be8fe43923da | [] | no_license | realcatking/GANRL | ea1af0875535f7c4c42dd256f8d402c9c49697b0 | b28de37a4d7d55f9d61552e6a895fb56e845f7ba | refs/heads/master | 2023-04-05T03:56:44.311389 | 2020-02-12T13:36:51 | 2020-02-12T13:36:51 | 240,021,470 | 1 | 0 | null | 2023-03-24T23:28:39 | 2020-02-12T13:37:07 | Python | UTF-8 | Python | false | false | 1,411 | py | ReadAttribute.py | '''
Read Attributes from files
for every node, store
a list of att_id
a list of att_value
'''
'''
The attributes of attribute network
graph
G.graph['att_num']
G.graph['map']
G.graph['node_map']
G.graph['id_vertices_map']
G.graph['att_map']
G.graph['id_att_map']
nodes
G.nodes[]['old_label']
G.node... |
f66658ecf133fe373e0be524ee351de8602744f4 | 71177206ef09b0ba56edcc72b65b577f863191da | /intel_software/pkg_contents/micperf/CONTENTS/usr/share/micperf/micp/micp/kernels/igemm.py | 89a273a6b4557da59442fe88c5ac82e7c907ed78 | [
"BSD-3-Clause"
] | permissive | antoinecarme/xeon-phi-data | 3d2ff2b2debdd102870a75a21cfad7e23c050aac | 883a6e2f31b2e729715303725f417b2990d923be | refs/heads/master | 2021-07-03T11:02:52.000072 | 2020-12-31T01:03:01 | 2020-12-31T01:03:01 | 213,457,168 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,071 | py | igemm.py | # Copyright 2012-2017, Intel Corporation, All Rights Reserved.
#
# This software is supplied under the terms of a license
# agreement or nondisclosure agreement with Intel Corp.
# and may not be copied or disclosed except in accordance
# with the terms of that agreement.
#
# Author: Christopher M. Cantalupo
import ... |
cf8dd4a8a92452ad79a43b0c975284e4d2c46d2c | dd375fe6299457e854760054400fa8ec1dfc9794 | /MisleadingWidgetsDetective_Algo/VectorClustering/VectorClusterer-what.py | 30ae3f83d661f2ae275f173e4017415c696a293a | [] | no_license | crepuscule/AndroidMisleadingWidgetsDetection | 1912762cb39ade3cc017f4b5597ed53cfc4ed2a8 | 54f9b9daa31d8babd91e5e403682e407b9a1d2df | refs/heads/master | 2023-05-04T16:21:26.386152 | 2021-05-18T07:39:46 | 2021-05-18T07:39:46 | 368,441,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,093 | py | VectorClusterer-what.py | import sys, os
sys.path.append(os.path.abspath('..'))
from Base import BaseProcessor
from bson import ObjectId
class VectorClusterer(BaseProcessor.BaseProcessor):
def __init__(self, config, DBP):
super(VectorClusterer, self).__init__()
sys.path.append(os.path.abspath('..'))
self.config = ... |
46cecca646dc3be239aaabcb7c5b316cf10c9267 | 009147e9b2c1f8bf410d4f60955b90e4a8a001dd | /app/errors/__init__.py | 727ec32d10423e9429c2d0d5df519dcf30e67db6 | [
"Apache-2.0"
] | permissive | AliOrabi/oee_server | 8d43e731303fccf1b61dba7122d9b2d8c74ac6f9 | e8f7982fb7ac7dfee2b311b4dbd07d4b1f9e3555 | refs/heads/master | 2023-01-20T09:52:57.608069 | 2020-11-19T17:14:09 | 2020-11-19T17:14:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | __init__.py | from flask import Blueprint
bp = Blueprint('errors', __name__)
# noinspection PyPep8,PyPep8
from app.errors import handlers |
7a06f0e78cc3e1c5d49c05bd97ab1e3b6f83b9f2 | 95801a12775f6146794c5cf14900ad254914477e | /ReadTTree.py | 6132374196eb0ec157da956d04941d5e1d5c5a9a | [] | no_license | ElenaGramellini/LArIATTrueCrossSec | 13e6f721cf54caee35082e4585d981d2547d1f17 | 657ff2684ee06e0e3ea5e004ec1acfbe0703736b | refs/heads/master | 2021-09-19T07:04:00.851554 | 2018-07-24T14:06:54 | 2018-07-24T14:06:54 | 107,028,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,438 | py | ReadTTree.py | from ROOT import *
import os
import math
import argparse
hDecay = TH1D("hDecay" , "Decay Kinetic Energy [MeV]", 40, 0, 1000);
hHadElastic = TH1D("hHadElastic" , "HadElastic Kinetic Energy [MeV]", 40, 0, 1000);
hInelastic = TH1D("hInelastic" , "Inelastic Kinetic Energy [MeV]", 40, 0, 1000... |
27c5e14da89e4354053a4ca5236001a4d83d97e7 | d1456bf52858426f51f3212fbd6144bf689087e0 | /capstoneapi/views/student.py | 55053d83ceb4b5d939f99f8d333c7997225c24c7 | [] | no_license | medlenmage/capstonebackend | 6ff6756a842c8f705c88e5f13ffa86c47189bdeb | 640979a97e6efcbab6f20dbff5dbd41e4f77c021 | refs/heads/main | 2023-04-23T03:36:55.215554 | 2021-05-12T23:47:25 | 2021-05-12T23:47:25 | 343,612,356 | 0 | 0 | null | 2021-05-12T23:47:25 | 2021-03-02T01:46:26 | Python | UTF-8 | Python | false | false | 2,375 | py | student.py | from django.http import HttpResponseServerError
from rest_framework.viewsets import ViewSet
from rest_framework.response import Response
from rest_framework import serializers
from rest_framework import status
from capstoneapi.models import Student, student
class StudentSerializer(serializers.HyperlinkedModelSerialize... |
1fbf101fff8bf7288cf0550591b48c2a64515664 | 05df223c8e26cb4326b9c64985f81f1d5e2a4cfd | /core/views.py | 62eeb8fad7bd8cb592de595172215552acc5fdff | [] | no_license | wagnerrafa/rh-desafio | b36ddd615a1615bc8af184d9b6f899134fba2871 | e0e3971383d76db9a0198aa80ff1303f179f59ef | refs/heads/master | 2022-12-23T01:24:57.998989 | 2020-10-02T22:58:38 | 2020-10-02T22:58:38 | 300,099,034 | 0 | 0 | null | 2020-10-01T00:42:10 | 2020-10-01T00:42:09 | null | UTF-8 | Python | false | false | 3,180 | py | views.py | from django.shortcuts import render, get_object_or_404, redirect
from .models import Company, Department, Employee
from django.http import HttpResponse
from django.views.generic import TemplateView,ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.urls import reverse_lazy
# C... |
ee0cbf9ce0f9b1e8f938c1d2261ee3425d291a95 | 1b9966ae15bee555ac0838d27cbdd0405c3e8bf0 | /sources/rnt/mediane/algorithms/lri/CondorcetPartitiong.py | 6c96c516881e84f5e30c22bf04ce4a15c32a9e45 | [
"Apache-2.0"
] | permissive | databill86/rank-aggregation-with-ties | f3ef509401f07b05a4e34689245bb71c9c5efe50 | 63b30d7c1eece837ef23ffc9414c3538052d9b9c | refs/heads/master | 2020-04-02T17:04:41.213764 | 2018-10-05T07:51:09 | 2018-10-05T07:51:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,701 | py | CondorcetPartitiong.py | from mediane.algorithms.median_ranking import MedianRanking, DistanceNotHandledException
from mediane.distances.enumeration import GENERALIZED_KENDALL_TAU_DISTANCE, GENERALIZED_INDUCED_KENDALL_TAU_DISTANCE, \
PSEUDO_METRIC_BASED_ON_GENERALIZED_INDUCED_KENDALL_TAU_DISTANCE
from mediane.algorithms.lri.BioConsert impo... |
da3557be6274704b6b1b528893f8423d7698cb9e | 75ec6a6665368cce353db5ceed7c0aa07fa38bb7 | /Minecraft Python/variables/message.py | 21dc1d63331a0d889835886bf0f0d2ad2515323a | [] | no_license | aleksandrmbelkin/mc | 1f5edbbe30cd83948d4a5afed62e3815bf0f3324 | 35025d11f7681877a87c3de822057d669402fea0 | refs/heads/main | 2023-01-19T14:17:46.161287 | 2020-11-14T17:34:51 | 2020-11-14T17:34:51 | 312,807,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | message.py | from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import time
s = да
answer = input("Создать кратер? Д/Н")
if answer == s
pos = mc.player.getPos()
ms.setBlocks(pos.x + 1, pos.y + 1, pos.z + 1,
score = 0
pos = mc.player.getPos()
blockAbove = (pos.x, pos.y + 2, pos.z)
... |
f2f7fb3d3fd9315842d3a139684987a560fc6873 | aaf2a087affa7c1e7055fad4ae75d9fc451dab68 | /app/models/photo.py | 047ef46941150cb09d6c2fac1615702a9212f3eb | [] | no_license | jdaniel01/dont-forget-the-gas | b050b5926fbc626b26c956d3b054383fefbf40c4 | 3a0fbb349f2e2d6eaa813620b17ea10359923ec1 | refs/heads/main | 2023-06-16T14:17:28.240291 | 2021-07-12T09:13:34 | 2021-07-12T09:13:34 | 381,166,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 692 | py | photo.py | from .db import db
class Photo(db.Model):
__tablename__ = "photos"
id = db.Column(db.Integer, primary_key=True)
url = db.Column(db.Text, nullable=False)
trip_id = db.Column(db.Integer, db.ForeignKey("trips.id"))
stop_id = db.Column(db.Integer, db.ForeignKey("stops.id"))
user_id = db.Column(db... |