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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c7278978b68e2ef5b049008077801fc906f69f3 | c244a7ce5fb5b68c835d4456ddcb98f1db3ca520 | /scipy2012/geoprocessing_tutorial/examples/calculate_centroids.py | e5e79f65ccb405ceb8b84124f78ac78a6e5dd677 | [] | no_license | uniomni/oles-tutorials | 44e849a6925179a80b550128c28fd895d2e7ff56 | f836185b2b076fd9fbe174644bc53530ee2836c3 | refs/heads/master | 2016-09-05T09:47:07.931897 | 2015-04-03T02:12:22 | 2015-04-03T07:21:01 | 32,794,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,076 | py | calculate_centroids.py | """This module provides different approaches to calculation of centroids
"""
def centroid_formula_naive(P):
"""Naive implementation of centroid formula
Input
P: Polygon
NOTE: This is not used for anything. Also it does not normalise
the input so is prone to rounding errors.
"""
... |
15ee05aea95b14d9fb0a709a91a1dcaef791ad01 | 19c87ebdb7a1f143087636acf235832571208931 | /parse_csv.py | 769d9f6bf6b79c7a507623607c3ed09a617e0e62 | [] | no_license | ilanbiala/15618-final-project | f2e86c420d39dba23678fbaf82e2adc78c3bfcc0 | 9218ea5fa4c1fcd98449812fe16c06464fe41263 | refs/heads/master | 2020-04-03T22:31:11.376416 | 2018-12-16T19:08:56 | 2018-12-16T19:08:56 | 155,605,238 | 1 | 0 | null | 2018-12-16T19:08:57 | 2018-10-31T18:27:04 | C++ | UTF-8 | Python | false | false | 3,390 | py | parse_csv.py | import plotly.offline as py
import plotly.graph_objs as go
import plotly.io as pio
import csv
import math
import os
dataSingleRead = []
data = []
mapTypes = ['Synchronized', 'Concurrent Bucket Locks',
'Hardware Lock Elision', 'Folly Concurrent', 'Folly Atomic']
with open('run.csv', newline='') as csvfile... |
58c0493c02fdc044e5ce772858c1f96ea0cf9fc5 | 3e069996eaa811e3a567bad45f506c2196d8f2b7 | /processor.py | 561d4e2ab1bda2d79f5baaaddd857db0ded551ba | [] | no_license | anacforcelli/PCS3446-2 | 46c539a4adf72793c8aa76731febb8e9cfc7d4e1 | 45ae616afc5294efd12aeaae967e8bdd32f2f3f0 | refs/heads/master | 2023-03-20T10:53:17.375920 | 2019-11-13T02:38:53 | 2019-11-13T02:38:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,824 | py | processor.py | # -*- coding: utf-8 -*-
from job import JobQueue
from event import EventType, Event, EventQueue
from Queue import Queue
class Processor:
def __init__(self, max_jobs, cores):
self.queue = JobQueue()
self.processing_jobs = Queue()
self.job_data = []
self.running_job = None
se... |
74d21148ef333f87441ac70e23f7eff7664c251d | 4a77e0e0f6cdc19760986db689d19edda140de00 | /pdf.py | 0ccc5c3341ef78c3622719fa6ec72b200a79fd66 | [] | no_license | GoPotatos/drive-script | b5bd13ed0351995f5655da1005d0f800f4d0962a | 89d5a096d0fb26afefd5cbd1e6562c117842d0d6 | refs/heads/master | 2023-03-22T15:48:33.430362 | 2021-03-14T08:08:36 | 2021-03-14T08:08:36 | 338,187,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,780 | py | pdf.py | pages_number=45
folder1=r'C:/Users/user/Documents/split/before/'
folder2=r'C:/Users/user/Documents/split/after/'
id=""
json_file_location="credentials.json"
import os.path
import os
import re
import sys
import subprocess
from time import sleep
from pydrive.drive import GoogleDrive
from pydrive.auth import GoogleAuth ,S... |
2568c44dc4da561cc7926821e04fd922e1667390 | 162e2588156cb2c0039c926c5c442363d9f77b00 | /tests/unit_tests/data_steward/cdr_cleaner/cleaning_rules/drop_zero_concept_ids_test.py | e6e927424c869f201fa22acf8b05605bfd6be01c | [
"MIT"
] | permissive | nishanthpp93/curation | 38be687240b52decc25ffb7b655f25e9faa40e47 | ac9f38b2f4580ae806121dd929293159132c7d2a | refs/heads/develop | 2022-08-08T20:33:53.125216 | 2021-12-03T21:38:48 | 2021-12-03T21:38:48 | 155,608,471 | 1 | 0 | MIT | 2020-10-09T01:14:39 | 2018-10-31T18:54:34 | Python | UTF-8 | Python | false | false | 4,069 | py | drop_zero_concept_ids_test.py | """
Unit test for drop_zero_concept_ids module
Original Issues: DC-975
As part of the effort to continue to improve data quality, rows with 0 source and standard concept_ids need to be
removed from the clean dataset
Affected tables and columns (both columns need to be zero or NULL):
condition_occurrence
- condit... |
c3f4a68e77c4ece575eecfeb6f9171581f9cec56 | 1f124c69943c0c4565e90b750350f1866d77c7c9 | /SNR/code/code.py | e53c29c0cfdabd370daebd72075389b6393d8b82 | [] | no_license | irenecortinovis/PET-imageAnalysis | 73d10b1ede8d5be2b5a450590f2f1b3d5cc4f179 | f2045fec178bb65eb16fb1e079c39b08dcae8758 | refs/heads/master | 2020-03-23T12:35:33.692733 | 2018-07-19T11:20:49 | 2018-07-19T11:20:49 | 141,568,756 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,091 | py | code.py | #!/usr/bin/env python
#--------------------------------------------------------------------------------------#
# #
# Simple script to analyse the data from the simple PET demonstrator #
# ... |
adf5830287f50d6b1db30b954e510be8a2f3a230 | 70382d8e143e2646041280dc4f57c5c106da0d51 | /productos/models.py | f7758e6b7a68384f2fdf56eff614c21a933efcff | [] | no_license | Eedal/products-django | 9889427081ac94a3ef65c369313131eb859ddaeb | c0f6d6f8a3517b23a23b9d86bbef5cd5ec67f1da | refs/heads/master | 2023-05-18T20:10:49.167830 | 2021-06-14T17:06:09 | 2021-06-14T17:06:09 | 376,868,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | models.py | from django.db import models
class Chela(models.Model):
marca = models.CharField(max_length=50)
alcohol = models.DecimalField(max_digits=4, decimal_places=2)
militros = models.IntegerField()
artesanal = models.BooleanField()
nacionalidad = models.CharField(max_length=50, blank=True, null=True)
... |
1f6150a978aa5dcb695b3c4ce10774c72bc18e86 | f9a7d3fdd622f50c3d336f430067b4d3596853ac | /app.py | d5302929d5cdfffbebf40c42e659cd10e361e125 | [] | no_license | 1855481/desktop-tutorial | 6d0892ac4868ef936ca8c3828b96472901c0069f | 50d4eec5d8d615f569fe5b1b2996003ae7d44683 | refs/heads/master | 2023-03-18T00:18:36.782577 | 2021-03-08T00:22:33 | 2021-03-08T00:22:33 | 304,131,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,683 | py | app.py | import os
from flask import Flask, render_template, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import desc
from flask_migrate import Migrate
from forms import AddForm
######################################
#### SET UP OUR SQLite DATABASE #####
####################################
app = Fl... |
d287980bdde91e0c4e6e55164d7ae5cd6958d90d | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/stript.py | 5235c68584e81cfda2afa06821113614f224b890 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 270 | py | stript.py | ii = [('ChanWS.py', 2), ('ProuWCM.py', 1), ('CookGHP.py', 1), ('AubePRP.py', 1), ('ChalTPW2.py', 2), ('CarlTFR.py', 7), ('GrimSLE.py', 1), ('CoolWHM.py', 1), ('LandWPA.py', 1), ('SoutRD.py', 1), ('WilkJMC.py', 1), ('BentJRP.py', 1), ('RogeSIP.py', 3), ('DibdTRL.py', 1)] |
a94a9f96b5a40c20bd707db7439f713fce54121a | 20b4942a4dcc9cabc2a10f4e1027a3b7999f34ff | /ID3/testID3.py | a6276af94778ac400b6885ccdfb386758131a257 | [] | no_license | Lemon-412/naive-machine-learning-beginner | 779b23f710409c7f253c0496cf82a6ab295c4ded | 2506cf2f634b1ea835ffe686b6f9fe05ec5c9d32 | refs/heads/master | 2023-04-07T20:32:16.408194 | 2021-04-08T09:12:41 | 2021-04-08T09:12:41 | 318,399,892 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | testID3.py | from ID3 import ID3
if __name__ == '__main__':
x, y = [], []
label = ["age", "prescript", "astigmatic", "tear_rate"]
with open("lenses.txt", "r") as FILE:
for line in FILE.readlines():
x.append(line.strip().split("\t"))
y.append(x[-1].pop())
id3 = ID3(x, y, label)
id... |
cfc26bb930e9f31666c9a4f02aa8c5f0fe99ef57 | 8574094da8e8ad4bd65e1bbe67dd1abd5003d6a9 | /zopen.plone.todo/src/zopen/plone/todo/browser/kssview.py | 789406f202be87c40722f569a844eec69e053b48 | [] | no_license | madfrog2018/everydo-project | 5b948f8b04c04773163eb5193e45604b1fe4a74e | d2ea5b83513cf4191e29ba70a1fc8b1d9950599f | refs/heads/master | 2021-01-17T06:33:26.229787 | 2010-07-15T01:45:19 | 2010-07-15T01:45:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 33,715 | py | kssview.py | import random
from DateTime import DateTime
from zope import lifecycleevent, event
from zope.component import getUtility
from Products.CMFCore.utils import getToolByName
from Products.Five import BrowserView
from kss.core import force_unicode
from plone.app.kss.plonekssview import PloneKSSView
from archetypes.kss.f... |
e184504974c2ca284b3cd14bfa89bb3c815bb1d4 | fab42e7d9938eacc68cfcbd915afb97eecb873bd | /CLRS/ch2_getting_started/selection_sort.py | 3e39f7ef145fd3af297139e69d95f8efc5746662 | [] | no_license | thetechnocrat-dev/algorithm-practice | aa36cd1273b916bdd01680b180b11868cb99fcf7 | 7161e21ed5053dfc262fa21b59bb9a62b9ccc1e3 | refs/heads/master | 2022-11-24T03:03:11.279385 | 2017-02-12T01:34:47 | 2017-02-12T01:34:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | selection_sort.py | def selection_sort(array):
for i in range(0, len(array) - 1):
smallest = find_min_and_ind(array[i:])
temp = array[i]
array[smallest['ind'] + i] = temp
array[i] = smallest['num']
return array
def find_min_and_ind(array):
smallest = float('Inf')
smallest_ind = 0;
for ... |
301cafb9fc9f53df85031e45119217935ce0176b | d404941ce684525e6c796f07051f4b99d59ee448 | /print_list.py | 787e9a6df1526d6688a0276b2a89a1ea8d0477b3 | [] | no_license | r53127/py_learning | 88de7cb5b907697058548069f655cc339f73ed32 | 134f4108ffc316506839a7925b9727cadcfef14e | refs/heads/master | 2021-06-12T14:14:43.864833 | 2018-05-17T14:38:57 | 2018-05-17T14:38:57 | 118,098,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | print_list.py | import tempfile
import win32api
import win32print
filename=tempfile.mktemp("a.txt")
open(filename,"w").write("This is a test file")
win32api.ShellExecute(0,"print",filename,'/d:"%s"' %win32print.GetDefaultPrinter(),".",0) |
2bce43d61a084922ce486c90f4dd1161cb44f6f9 | c1db8a065585951bf90f1c05faa4e6bf03e38975 | /algo/linked_list/question_234_Palindrome_Linked_List.py | 27c0aaa7de2df50a3be0cf53973e5523a3449750 | [] | no_license | psu4/leetcode | ba009b8a1ccad94f6cca941659670c7fef6dd24b | b04634e55e516db7115cca6786927729c370760f | refs/heads/master | 2021-07-19T00:13:04.973297 | 2020-04-13T05:46:55 | 2020-04-13T05:46:55 | 130,005,264 | 0 | 0 | null | 2018-04-18T06:37:11 | 2018-04-18T04:48:39 | null | UTF-8 | Python | false | false | 1,946 | py | question_234_Palindrome_Linked_List.py | # 234. Palindrome Linked List
# easy (i think it is medium for the optimal solution)
# Given a singly linked list, determine if it is a palindrome.
# Example 1:
#
# Input: 1->2
# Output: false
# Example 2:
#
# Input: 1->2->2->1
# Output: true
# good link of the solution: https://www.youtube.com/watch?v=wk4QsvwQwdQ
... |
6e48750502f95ea5948edfbf19e5316f606a7a4e | 3a9233469d9e9e70f7feab1fbe187224fc3518d6 | /duffingEq.py | 60d71967d7cae1d11a0ed71cace97cb8a0fecc9e | [
"MIT"
] | permissive | weishanlee/duffin-Equation | 011f9df1f44dd192e52a48a2ee244613c4bf06e0 | 629a78e0a3c6546809a4677f797981cbb605fdbf | refs/heads/main | 2023-04-02T04:43:31.199704 | 2021-04-02T05:50:05 | 2021-04-02T05:50:05 | 353,920,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,541 | py | duffingEq.py | # -*- coding: utf-8 -*-
"""
Duffing Equation:
ddx + delta * dx + alpha * x + beta * x**3 = gamma * cos(omega * t)
References:
https://en.wikipedia.org/wiki/Duffing_equation
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import AutoMinorLocator
#%% function to plot multiples of pi in x a... |
a3515b134209f9d003030c64e6917e14fcfaa934 | 4ef77d81474d83b12cc6c5cb92b3555c5c547e58 | /stuff/stuffFx1.py | 8c0dc1ffa287cdd6777568b6bfacb8c7b584e932 | [] | no_license | FreeCodeCampHelsinki/pythonLessons | 7114b0dd8edf4c450b70a1a3604dec7086789100 | 6914e7e134ef8cbc3d7eb09587d12dd479299c11 | refs/heads/master | 2020-04-28T09:43:12.722328 | 2019-05-17T16:21:26 | 2019-05-17T16:21:26 | 175,177,596 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 28 | py | stuffFx1.py | def someFx():
commonFx() |
45cbbb63053f891ea1c2e1cc6a9497baa707d61b | 00ed8e075ffdb1cde1ad71d96b903ae9fc27f527 | /sportifierapp/views1.py | f4c38c1e2f1eb657f90b8dc0d4b107f78ed5ce96 | [] | no_license | zteng/Django_Web_Ticketing_Portal | aff0af383094e9967f48c3bb3edfd46d7f4fa828 | cb52808c3288e90f5674edd69ee6644957286ca2 | refs/heads/master | 2021-01-18T19:26:09.891729 | 2014-09-23T05:33:43 | 2014-09-23T05:33:43 | 24,357,058 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 13,633 | py | views1.py | # Create your views here.
from django.shortcuts import render, redirect, get_object_or_404
from django.core.urlresolvers import reverse
from django.db import transaction
from django.http import HttpResponse, Http404
# Decorator to use built-in authentication system
from django.contrib.auth.decorators import login_req... |
84ff7dc3eaad840fc106d030a52267d92510aa07 | 8f55bf6bd8898695c8e0e2b5c5eb391d6863f556 | /LocalABC/util/save_out.py | 8b6487fd39733fc9d0d287168e903a5b48694c13 | [] | no_license | MatthewAlexanderFisher/LocalABC | 64ec8f74878c1d5e84599f678877793d5c5a10c6 | 98be6c75ad931eb612167e363ba71ff0dd1c9754 | refs/heads/master | 2021-07-13T11:47:49.181427 | 2020-10-22T15:23:39 | 2020-10-22T15:23:39 | 213,244,009 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | save_out.py | from pathlib import Path
import pickle
import dill
import os
### Save output
def save_output(out, name, dir_name):
root = Path(".")
new_name = name + ".pkl"
new_path = root / dir_name / new_name
with open(new_path, "wb") as handle:
dill.dump(out, handle, protocol=pickle.HIGHEST_PROTOCOL)
##... |
21126089c3da92e82a7cb5b15d3c5071b71a0cd0 | eb68b6e915f2659aa8feba13f7c2adbb8aab8a34 | /Gensim/gensim_dictionary.py | 2e85b2e4a64d81f6c8b8eac00f985fdcb7597a61 | [] | no_license | th00masml/Natural-Language-Processing | 65090a0936fabb35c519438c013b392de91c612a | 89ee0288f4eea12289f0a49f7b4ef4ab001c510b | refs/heads/master | 2021-07-01T01:12:50.400107 | 2021-04-05T11:35:51 | 2021-04-05T11:35:51 | 227,187,209 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,378 | py | gensim_dictionary.py | import gensim
from gensim import corpora
from pprint import pprint
documents = ["We can defne a neural network that can learn to recognize objects",
"in less than 100 lines of code. However, after training, it is characterized",
"by millions of weights that contain the knowledge about m... |
a555d39d0d5e5aa64175d1fb5f87bac68371ff9d | 658080319406ed9b25acc721b4eee17a6c534295 | /StatProjector/GenerateProjectionsGoalies.py | 29545859dba999f055ffaa273720b36152c9da07 | [] | no_license | JeremyDenHartogh/FantasyHockeyHelper | adff79a5a8fd490ca7820d3a10c9b9f17065c94e | 4e750912f244df416634140ecfc0adcd32278746 | refs/heads/master | 2020-03-27T17:16:21.903153 | 2019-01-09T17:52:27 | 2019-01-09T17:52:27 | 146,840,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,004 | py | GenerateProjectionsGoalies.py | import pandas
import statistics
import numpy as np
from pandas.plotting import scatter_matrix
import matplotlib.pyplot as plt
from sklearn import model_selection
from sklearn import linear_model
# Functions train_X functions train that specific statistic with the given model to generate projections
def train_wins():
... |
956bca6f69093004fd577197ecd493e41e6ca4fa | b7ec1d4e2905348ed1f01b40ac2ff062b1b974ee | /flopclustering/flopsubsets/convert.py | 83012aafb66e3ac8822aeb8453a47e17fa4b8561 | [] | no_license | masonmcbride/poker | 068adf7a7e35ff7637045ff94967e679cb701296 | 5f5350f205864f90d925b3ee30d275157fd62764 | refs/heads/master | 2023-07-09T04:37:04.545528 | 2021-08-09T23:04:42 | 2021-08-09T23:04:42 | 383,774,535 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | convert.py | from collections import defaultdict
import pprint
flops = defaultdict(int)
orig_file = open('184flops.txt', 'r')
entries = orig_file.readlines()
for entry in entries:
flop, freq = entry.strip().split(":")
flops[flop] = freq
sorted_flops = {k: v for k, v in reversed(sorted(flops.items(), key=lambda item: ite... |
55becf601b868624d4badc546d6ead65e63a035b | 9cedf3692fc224aaedc2a0f4757e25b952d49285 | /moviereviews/evalute.py | 8337cdb4431221d1921d9ddf7b2ccd2719378e56 | [] | no_license | JustinZhangg/sentiment_predict | 03080ad588c893d523a1d99584eaec4d46cd9578 | 007dd92bd01f0b08dca61d78fa633e50f4cc7d6b | refs/heads/master | 2023-07-10T16:06:59.296936 | 2021-07-28T11:15:40 | 2021-07-28T11:15:40 | 390,322,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,182 | py | evalute.py | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 1 20:50:46 2020
@author: wenjie zhang
"""
import matplotlib.pyplot as plt
import numpy as np
import itertools
import classifier
# plot confusion matrix
def plot_confusion_matrix(cm, target_names, title='Confusion matrix', cmap=None, normalize=True):
accuracy = np.t... |
dc57c5ea06f7caea99d23821fd946348d2104467 | 199795f8a4e373d06df721604a8281d98bdcecf4 | /setup.py | b540509548b3d8283d7b6d731db0344d5314e3d9 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | xMonty/sqsworkers | 0a715f587285e04247213186d64237386e8b1d51 | e92b5b82e3a443697c0610f2829fab55ae95a8ec | refs/heads/master | 2020-07-10T19:05:16.549290 | 2019-08-05T17:12:02 | 2019-08-05T17:12:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 785 | py | setup.py | import os
from setuptools import setup, find_packages
VERSION = "1.0"
DEVELOPMENT_REQUIREMENTS = [
"pytest",
"coverage",
"pygments",
"pytest-cov",
"mypy",
"pytest-mypy",
"black",
"pytest-black",
]
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
... |
07ce3c542a8545b89f6098cb985c034256423bd9 | b4c1a3d0bfd19495d311c06f5fb6187648b0dfcb | /queue.py | a26f97e85325153398c52730abc3c3323ca98e69 | [] | no_license | Visaal/algorithms-data-structures | 8905202294824d4089e2247e1d9709262a9a261e | 7d7f08275365cc3151abca735521393df385cf79 | refs/heads/main | 2023-01-28T22:03:28.932144 | 2020-12-04T20:51:44 | 2020-12-04T20:51:44 | 317,352,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 939 | py | queue.py | """QUEUE
A collection that returns items in the same order that they were added
- First In First Out (FIFO)
- Enqueue to add an item to the queue
- Dequeue to remove the head item from the queue
- Peek to see what item is at the head of the queue
- Can implement using a Linked List or an Array
- Can have a Priority Qu... |
b21210f0cdb61d7df58e38631978b67aff558595 | 0859499851a745872e3c9d193f57ae7ff97bd3d2 | /thresold_seg.py | 21bf41be2bdf45d774520574ffcba25702a17a05 | [] | no_license | PrayagMadhu/CV-Projects | d481db3468b0dad68eb3c7dd99766018880a3e5d | 0778c5c2d3e91ffc88c27395f01a336af886b1f5 | refs/heads/master | 2020-12-11T11:22:57.970723 | 2020-01-14T12:28:31 | 2020-01-14T12:28:31 | 233,835,343 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | thresold_seg.py | import cv2
from matplotlib import pyplot as plt
import numpy as np
img=cv2.imread("check.png")
gray=cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gray_r=gray.reshape(gray.shape[0]*gray.shape[1])
for i in range(gray_r.shape[0]):
if gray_r[i]<gray_r.mean():
gray_r[i]=255
else:
gray_r[i]=0
gray_r_=gray_r.reshap... |
45078aead06c5e75dc8edadfbe4c1a2060a74b82 | 49ea77b8749c20b0283c1b6bd5e0416f2099e8df | /bellows.py | b750f6ba6ba4d907d57357a563f4ea9dd9a47e4d | [] | no_license | ddjokic/diaphragm | 9f74b92f1ea0b60395b78aaf060ef841096c2541 | f2de7727b30b808e817aadb39ef4d41540880ac9 | refs/heads/master | 2021-01-17T13:01:24.488489 | 2014-04-30T09:34:38 | 2014-04-30T09:34:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,810 | py | bellows.py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 02 14:16:35 2013
@author: Anand
"""
import matplotlib.pyplot as plt
import numpy as np
import data_diaphragm
from roark_membrane import sigmaRmax, sigmaEdge
def graph(x, y, xlabel = "", ylabel = "", legend = "", color = ""):
"""
Plots graph of x vs y with given p... |
80094f8be2d463d4747b6fcbb43675cd8c026671 | fd68c27acb6bb51b1ca6cd05ec61b0a36a160e23 | /andys_files/saveTitles.py | bc9af4b44c4ce86f0a5f93c1be2f35e2d8980ef6 | [] | no_license | jasonyjong/cs224u-wiki-generator | 1fbe93d259c6b59cdcf223c024b2ca720a7d73b3 | eaae6ce69a4b921f74f7ccd8bdbf3de0c2ec9d76 | refs/heads/master | 2020-04-16T19:43:12.794629 | 2013-03-14T22:00:34 | 2013-03-14T22:00:34 | 8,474,715 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 308 | py | saveTitles.py | import pickle
import collections
#articlesTitles = collections.defaultdict(lambda: 0)
articlesTitles = {}
f = open('title.txt', 'r')
for line in f:
#print line.strip()
articlesTitles[line.strip()] = 1
output = open('articlesTitles.pkl', 'wb')
pickle.dump(articlesTitles, output)
f.close()
output.close()
|
54f49984383f0619e843cc7a904554f8e27f7ab4 | cf1b3312af6395c0f8cc7d3ef7d6310a125816bf | /examples/sentiment_analysis/textcnn/export_model.py | 5386a4f568aeb1d5f8352adc6c291c58741e4909 | [
"Apache-2.0"
] | permissive | thomas-yanxin/PaddleNLP | 92db7b4c5eef4494f6e770eaebd80001e66494d2 | 1ddc5bbeeb587a20c10629d17b030214aba77990 | refs/heads/develop | 2023-06-22T18:00:34.532679 | 2021-07-21T06:12:58 | 2021-07-21T06:12:58 | 388,380,705 | 1 | 0 | Apache-2.0 | 2021-07-22T08:11:12 | 2021-07-22T08:11:11 | null | UTF-8 | Python | false | false | 2,349 | py | export_model.py | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
93f03fe7689bc7f1657407d43d4d71af3fd27a5a | 9bb3cda9eb959e0b33a408dabb3da7be385a5c88 | /summarizer_server/tests/test_text_rank.py | d1035f332a1b631e87e4275740f1995716da6566 | [
"MIT"
] | permissive | jent-ly/summarizer_server | 3f9e88cb009374c738bf8846d118f137d4831ece | 98f9b49d17aa637648cce1dd7ab9ad0efec5fe09 | refs/heads/master | 2020-05-26T03:24:33.281047 | 2020-04-30T16:18:07 | 2020-04-30T16:18:07 | 188,090,776 | 2 | 1 | MIT | 2020-05-08T18:13:06 | 2019-05-22T18:12:38 | HTML | UTF-8 | Python | false | false | 3,676 | py | test_text_rank.py | import unittest
import tests.utils as utils
import math
import pdb
from nltk import tokenize
from text_rank import TextRank
class TestTextRank(unittest.TestCase):
def setUp(self):
self.text_rank = TextRank()
def test_process_html(self):
article_html = utils.get_article_contents("article1.htm... |
5db57cd8f7605e627d3bd86024e7f7b3fd4c612a | faea6554bcc447ffdd01e548ac6aca5c384fe226 | /entertainment_center.py | 9c251051206146b33a976c69956fb2ceca1aa3ba | [] | no_license | philippbechhaus/uda-ipnd-s3 | 282151f44c34416ef12c0df8213ae14d08205e7f | 603fa914b1e5b0710d6aa80fe4f31440df580749 | refs/heads/master | 2021-01-19T20:47:07.110941 | 2017-04-19T15:27:20 | 2017-04-19T15:27:20 | 88,554,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,112 | py | entertainment_center.py | import media
import fresh_tomatoes
# ---START Movie Database---
the_dark_knight = media.Movie("The Dark Knight",
"With the help of allies Lt. Jim Gordon (Gary \
Oldman) and DA Harvey Dent (Aaron Eckhart), \
Batman (Christian Ba... |
59b8b332f0a332401da7d773ea0b6b747d9c56d1 | 38ed2dfed88b62c72421c0d5be7a9a85b5929b05 | /BlackJack_Final/card.py | 45c35f576941b88abfcdff95f3e6da54d76e69bf | [] | no_license | Norsynth/BSU_CompSci_Labs | a3e3d7ad5171baf274f8a0bea9f9a09d4ba2a603 | 8236203c3acae555ea21c72a5f28582dcccdf6c5 | refs/heads/master | 2022-12-13T11:28:03.994475 | 2020-08-29T20:39:09 | 2020-08-29T20:39:09 | 291,342,382 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | card.py | import os
import tkinter
from breezypythongui import EasyFrame
class Card(object):
'''defines the name, suit, value, and img for each card '''
def __init__(self, name, suit, value):
self.name = name
self.suit = suit
self.value = value
x = self.suit ... |
1552106322f6038f4978776d529ffe8c9467489c | 591612327270a15394a9031e0a01c3e6bcebb816 | /grupos/migrations/0001_initial.py | eca1127a88e4a0bb203248d417b1919445b62023 | [
"MIT"
] | permissive | Etxea/gestion_eide_web | 5574b1e7756d78a3e94b5c4580c42fbab48c1557 | 8a59be1ddb59a4713cb3346534fd01f643d8f924 | refs/heads/master | 2021-01-24T21:57:22.357243 | 2015-10-03T13:50:23 | 2015-10-03T13:50:23 | 19,812,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,946 | py | 0001_initial.py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Alumno'
db.create_table(u'alumnos_alumno', (
... |
73ea2983f36b6f227f98b8564412aa97dff6f1ee | 7c13923b95832e1a3177cb2e44f5964122386809 | /app/statistics/views.py | e3eba4f338e1e300dc4127fd0862485047a3346c | [
"MIT"
] | permissive | zhounanshu/SEMD | 46a31cdaf75dea2f97486e893eea29c04d2dc9b9 | 42a893ddf441bc770126bef1d62a5840ef1f8dc7 | refs/heads/master | 2021-01-21T04:55:12.857195 | 2016-07-03T16:56:13 | 2016-07-03T16:56:13 | 47,088,665 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | views.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from ..models import *
from flask.ext.restful import Resource
import datetime
from ..lib.util import *
class totalData(Resource):
def get(self):
counts = devData.query.order_by('datatime desc').limit(1)[0]
return {'status': 'success', 'data': counts.id... |
d00425856ebc421627b03664cf2d6187d242542e | ebf307a90f3abae46fcb7718fd16308cc93b9f02 | /util/test/test_coords.py | 11c014d986cd8033b632c64543e52924a8b2e5bb | [] | no_license | bigdatasciencegroup/lemon | 16a2af41fdf2b305acb57e61086c1ca357a2b522 | 8dc539459347f4715d213723a507b62c2da14587 | refs/heads/master | 2023-06-04T12:36:59.504796 | 2021-06-29T20:33:22 | 2021-06-29T20:33:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,096 | py | test_coords.py | #! /usr/bin/env python2
# Copyright (c) 2019 Victor Terron. All rights reserved.
#
# This file is part of LEMON.
#
# LEMON is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... |
fa8cb35cdadbc0e6b24caa8810f47261eb001c13 | 6bc52252866ea7e5c5fe1ef721eb0f4998f330f8 | /budget_tracking_tool/config.py | febd93475b503d7d5a72a32c8fa179a02be2d606 | [] | no_license | ryancwicks/BudgetTrackingTool | 8bcc139af49339588d9c71fe30b0f9bd10736623 | 15e6873ce9de6cb7addd4e5eae0d1f266b7818b4 | refs/heads/master | 2020-04-25T02:14:15.581043 | 2019-05-13T23:19:38 | 2019-05-13T23:19:38 | 172,432,490 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | config.py | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('BUDGET_TRACKER_SECRET_KEY') or 'Temporary hard to guess key.'
CERTIFICATE_LOCATION = os.environ['BUDGET_TRACKER_CERTIFICATE']
@staticmethod
def init_app(app):
pass
class DevelopmentConfig... |
00ecf87002cc271823d8f563c5a66ec4df1816d8 | 9383d9ad2ac8f591add8200f112ec9d8ecd0f46b | /tally_ho/apps/tally/forms/disable_entity_form.py | 217049232b975139459756975d449f50305763ec | [
"Apache-2.0"
] | permissive | onaio/tally-ho | 735bdaf48ae01e8412f675d57924a2aab470cdc6 | 760cd1ab4a2f689fd703c48a60ae48794aa1941b | refs/heads/master | 2023-08-20T00:51:19.549561 | 2023-08-17T11:21:52 | 2023-08-17T11:21:52 | 16,270,357 | 13 | 18 | NOASSERTION | 2023-09-14T06:33:34 | 2014-01-27T05:37:59 | Python | UTF-8 | Python | false | false | 4,878 | py | disable_entity_form.py | from django import forms
from django.utils.translation import gettext_lazy as _
from tally_ho.apps.tally.models.center import Center
from tally_ho.apps.tally.models.electrol_race import ElectrolRace
from tally_ho.apps.tally.models.station import Station
from tally_ho.apps.tally.models.ballot import Ballot
from tally_h... |
b17049b3041ae20515b2cf64f011178a498116ee | ded03700d4d43982899655534fdeebc81cdbd8da | /app.py | 8cd0731bec804f7e56cc31b32483b5620549950d | [] | no_license | hkaralar/todo-api | 23934da50b22d0310237c3f432f7de9bfc551e3c | b205ed22dd856832bbe17c3000d7a743cbdcbfe5 | refs/heads/master | 2021-06-24T22:29:09.643139 | 2019-11-16T00:02:32 | 2019-11-16T00:02:32 | 222,020,460 | 0 | 0 | null | 2021-05-06T19:45:33 | 2019-11-15T23:39:34 | Python | UTF-8 | Python | false | false | 2,934 | py | app.py | import os
from flask import Flask, jsonify, request
from pymongo import MongoClient
from bson.json_util import dumps
from bson.objectid import ObjectId
from flask_cors import CORS
from dotenv import load_dotenv
load_dotenv()
# Veri tabanı bağlantısı
uri = os.getenv("MONGO_ATLAS_URI")
client = MongoClient(uri)
db = cli... |
91b0c3ddb585061adcdbf7bd9c75c2243b9f8510 | e201de307de94b8632e3da00b09dc6e90dc90f96 | /Other_Files/test_api.py | b5ed53298b9d14fbe2d8852ecc9789c43bfd7ce7 | [] | no_license | baotran306/CanteenManagement | c7b066e5417fce8f615db4e23bcf376944e24fc5 | 7e1aa425dfd4fedc76a205310d779390262da7c8 | refs/heads/master | 2023-09-03T03:51:31.552566 | 2021-11-12T08:30:56 | 2021-11-12T08:30:56 | 350,731,393 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,080 | py | test_api.py | from flask import Flask, jsonify, request
from flask_cors import CORS
import Other_Files.def_utils as utils
app = Flask(__name__)
CORS(app)
@app.route("/staff", methods=["GET"])
def get_news():
rows = utils.get_info_staff()
data = []
for r in rows:
data.append({
'id': r[0],
... |
9711daafd87075cd87841fe00a64a57e709e9887 | 9511be207d45ac78bd85653bd4a4edf8cb4c3d3b | /medicar/api/admin.py | ee8abac0f18491af043dc4bd5c777de0a1cb7420 | [] | no_license | emanuelsdsj/Medicar_Intmed | 32e1bf0ae0f8e8c733a294cb04cbec583afc6633 | 3d0d9353102cac9b7b0634a5dd92b314b17eeb31 | refs/heads/master | 2022-12-23T08:16:23.403388 | 2020-09-28T01:13:40 | 2020-09-28T01:13:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | admin.py | from django.contrib import admin
from .models import Especialidade, Medico, Agenda, Consulta
admin.site.register(Especialidade)
admin.site.register(Medico)
admin.site.register(Agenda)
|
d02f05ad98eecadc7aaa9c7ffa023b7554902572 | e4e3c6dd9b154bcb4e08b540776b4e67f2a6ac5a | /separaraARchivos/extencion_usuario.py | 4a2c5c3302e543c8dc73d248e419b41bfc5adbb8 | [] | no_license | Hectorc70/separador_archivos | 2f207252ec47e852c530831f413793ff5245ab21 | 2985131783a207a10d825db9ae41097931d284dd | refs/heads/master | 2023-05-20T16:52:06.432525 | 2021-06-10T18:57:11 | 2021-06-10T18:57:11 | 375,795,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | extencion_usuario.py |
from tkinter import *
import tkinter as tk
from tkinter import ttk
texto_in = lambda texto: texto.get()
def crear_entrada_datos():
ventana = tk.Tk()
text = tk.StringVar()
entrada = ttk.Entry(ventana, textvariable=text)
entrada.config(justify="center")
entrada.grid(row = 3, column = 2, pa... |
baa376891a174e9268a37f544d31810e9a061adc | 8f9f689f321b58eafa5c42f623349f0ecac78f97 | /app/carts/migrations/0009_auto_20211024_0626.py | d7f2bc9873ba930305a0e3e6b9222e3521d31b99 | [] | no_license | sshoemake/Meal_Project | d273bc0afa56e9df7000fda08fba13225ca7545d | cac426eb9a6569fe19b552028baa1c26d25751a7 | refs/heads/master | 2023-08-07T13:48:29.800381 | 2023-07-22T02:06:08 | 2023-07-22T02:06:08 | 221,129,090 | 0 | 0 | null | 2023-02-15T19:22:29 | 2019-11-12T04:22:35 | JavaScript | UTF-8 | Python | false | false | 543 | py | 0009_auto_20211024_0626.py | # Generated by Django 2.2.24 on 2021-10-24 06:26
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ingredients', '__first__'),
('carts', '0008_cart_details_found'),
]
operations = [
migrations.Alte... |
b8d079c6e31ad0aab21d558701679ae01dcc8096 | 8c1435bd3307f6d35fd32a4a61e6a31736855fbf | /fit.py | adab8675890b9a4eeb474bb0099389c9ef63b2b6 | [] | no_license | natekred981/Baseball_app | 2f0f539233e69419f61eb4764a05be9b6bf9acc1 | cc091d5050f2d60193276cf025e7bdd11bcf5af0 | refs/heads/main | 2023-07-02T15:38:39.264554 | 2021-08-04T15:55:30 | 2021-08-04T15:55:30 | 379,633,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 669 | py | fit.py | from extraction import create_table
from sklearn import svm, metrics
from sklearn.model_selection import train_test_split as tts
import numpy as np
"""
get_svm is a simple support vector machine classifier that
uses a linear kernel to predict whether or not a given baseball
player will make the Hall of Fame
It takes t... |
633ca8c35c9cf20158a053e63302452aff49d3f1 | 0efc7bedddb7bf3bf831fbc3004b39e45912d2bd | /gymbot/management/commands/chat_bot.py | 8d56b48c5e4f95dec6d294d3199643e8a71f629c | [] | no_license | ghostnoop/GymBot | 87ca62e950f5afb20c706e3d66e948eededda441 | 8441d83b31bb4e949a512163cc37ee197611c154 | refs/heads/main | 2023-06-26T05:40:08.121122 | 2021-07-29T15:42:50 | 2021-07-29T15:42:50 | 390,773,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,203 | py | chat_bot.py | import asyncio
from datetime import datetime
import aiogram
from aiogram import Bot
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.cron import CronTrigger
from django.core.management import BaseCommand
from gymbot.management.commands import handlers
from gymbot.management.comman... |
63d37c3e5d2c5202c6fac3fd525adee5c2fcf160 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_3_neat/16_0_3_inken_kuso_s.py | 6d41163b508a8b2a445328d553b2f082e053bce5 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 614 | py | 16_0_3_inken_kuso_s.py | #use ipython
ap = []
cnt = 0
print("Case #1:")
for j in range(2147483649,4294967295,2):
n2 = format (j,'b')
ap = []
ak = [0,0,0,0,0,0,0,0,0]
flg = 0
for i in range(2,11):
kite = int(n2,i)
ap.append(kite)
ak[i - 2] = 0
for k in [2,3,5,7,9]:
if kite % k =... |
7853f26fe000ea33d7436d44ec4d2e0b42f3f34b | 75c82382c1b341a5bb00ffc877193b1cba6bbb1a | /HW4_OOP/HW4_OOP.py | bbf4ac5e1dcebcd6d4c90161d24417848c2c0580 | [] | no_license | VitaliiRevenko/Cursor_basic | c0af86bd7561b2661e3b18a43c1147ae4af53058 | cb093663cb65ec845604c5bec4c9ad6e964b71f9 | refs/heads/main | 2023-04-07T04:15:49.186689 | 2021-04-12T17:25:55 | 2021-04-12T17:25:55 | 340,166,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,458 | py | HW4_OOP.py | # 1. Create a Vehicle class with max_speed and mileage instance attributes
class Vehicle:
def __init__(self, max_speed, mileage):
self.max_speed = max_speed
self.mileage = mileage
# 2. Create a child class Bus that will inherit all of the variables and methods of the Vehicle class and will have
# ... |
774d19f3ab77f6d335eb2f7c93ad40d5f7937279 | d6f1540d3fac7a7d589de7e6af15c47904354af2 | /helloworld.py | f9df91565dade4cb084f5f14ed7437de537e3e37 | [] | no_license | bearshen/gaepyapp | 7bb8e5874a5bf720b30b7bbb3f73234827fa000e | 255c9bdb5e36d964742fa567bb5c350349d7a1ae | refs/heads/master | 2020-04-06T13:04:34.683157 | 2013-12-28T07:58:27 | 2013-12-28T07:58:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,714 | py | helloworld.py | import webapp2
import cgi
import codecs
import logging
import re
form="""
<form method="post">
<textarea name="text">%(user_input)s</textarea>
<input type="submit">
</form>
"""
form_user_signup="""
<!DOCTYPE html>
<html>
<head>
<title>Sign Up</title>
<style type="text/css">
.label {text-align: ri... |
5f20c43cdbce8a4d50e735beb05229d680e50851 | cd013ce168d84bbe9a4541093c14e07fddea78fd | /flask_basic/f11.py | d90deedb23d1249c0027a13807cfa290b7c48c8b | [] | no_license | Ko-jongyoon/ssmc_python | e4a9f8b7989f8cbc8aec360057d0fbdcf5c80315 | 2ef9ae8b24691023ab59f6ccb5ed54ff790bee2a | refs/heads/master | 2020-04-14T19:47:14.614233 | 2019-01-24T07:15:54 | 2019-01-24T07:15:54 | 164,070,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | f11.py | # 주소 뒤에 / 를 붙이는 여부
# ~/pro
# ~/pro/
# 이 2개의 주소를 같은것으로 볼 것인가?
from flask import Flask
app = Flask(__name__)
# ~/pro/ => 404 not found : 존재하지 않는 페이지
@app.route('/pro')
def home():
return 'hello world3'
#~/pro2/, ~/pro2 허용 하겠다면
@app.route('/pro2/')
def pro2():
return 'hello world123'
if __name__ == '__main... |
196c3f455b185c2fe21c6a4ef167275f57232e99 | edf690f70125a2535d4f49b6c49e044424bdd52f | /lec1/app.py | 06a8249ce909d12e5d2c9591085659ada74ccf2c | [] | no_license | jibachhydv/cornell_backend | ca3d7302ccedd8bc93ac7ee58420901280f4522b | e2ffb338b3ef5b9d23a0dc2cc4bdd7fb2f5b1f84 | refs/heads/main | 2023-08-01T13:31:14.604650 | 2021-09-25T07:19:49 | 2021-09-25T07:19:49 | 410,205,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,090 | py | app.py | # Importing flask
from flask import Flask
from flask import request
import json
# creating a flask object
app = Flask(__name__)
# todo list
tasks = {
0: {
"id":0,
"description": "do laundary",
"done": False
},
1: {
"id":1,
"description": "do homework",
"do... |
79dab6df55ecd38f87acb13d0022672ec234f0bb | 61324a3e229ba61efcd790248ec8d38e02bb97d2 | /contest_abc/135/b.py | d9e9ec1051bc3a4ded7c50b1e20abc05d2f962c0 | [] | no_license | komtaki/atCoder | 3efd3e71955865fd083f0b9757e561df2ec2eb87 | ad20c5242aa7453a217ddba09981823e02865f45 | refs/heads/master | 2020-08-06T19:37:25.894580 | 2020-08-02T12:23:05 | 2020-08-02T12:23:05 | 213,126,564 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | b.py | import sys
input = sys.stdin.readline
def solve(N, P):
PP = sorted(P)
cnt = 0
for l1, l2 in zip(P, PP):
if l1 != l2:
cnt += 1
return 'YES' if cnt <= 2 else 'NO'
N = int(input())
P = list(map(int, input().split()))
print(solve(N, P))
|
d20a5c8e3b508e15c4c26b01fbbd22ea5fd0df44 | 9ead905a80af1ce8d59330adbed58c40feef77d3 | /recover/Ressources/get_flag.py | 93d4a7f03a173799c63ea2bfb7503bf61e5776a2 | [] | no_license | Sacrimento/Darkly | dd6adda95f6f260a4ece5831f4665dc9f00a85fc | d1f3d720f8d84a1e300ea7db288f5d98c2262a2a | refs/heads/master | 2022-12-16T00:19:59.201539 | 2020-09-23T14:50:21 | 2020-09-23T14:50:21 | 296,899,115 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | get_flag.py | import os
import requests
import re
ip = os.getenv('darkly_ip')
baseurl = f'http://{ip}'
if __name__ == '__main__':
r = requests.post(baseurl + '/index.php?page=recover', data={
'mail': 'toto@toto.com',
'Submit': 'Submit'
})
m = re.findall('The flag is : ([a-z0-9]+)<', r.text)
print(*m... |
3b696dd7fdffc66e8693609e0e5342e7720055ec | 86d295501dba8cb96b9e48f657a119b3020fbbad | /demo_train.py | 2be5e7e6410c2cc0d07e72d3dc8d06cec338bdde | [
"MIT"
] | permissive | ryanfwy/image-quality | 3a1e98504b845f8eb851842fd5e2e96ebb065793 | a7d0859e2bc6493885b41fd6aa85a9dfa980c656 | refs/heads/master | 2021-06-02T08:11:44.316815 | 2020-04-22T10:22:55 | 2020-04-22T10:22:55 | 254,319,411 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | demo_train.py | '''Train Siamese NIMA model networks.'''
from model.siamese_nima import SiameseNIMA
if __name__ == '__main__':
# dirs and paths to load data
train_image_dir = './assets/demo/train_images'
train_data_path = './assets/demo/train_data.csv'
# load data and train model
siamese = SiameseNIMA(output_di... |
a031338e4a3236c88e288bdcac917ab65aef697e | 81899a7d19fdf80e4ad07a585d43167364a67a3f | /orders/migrations/0003_auto_20180923_2018.py | 1ba66fca6ee26f130d55adb53a10d5ae33d9049c | [] | no_license | rohitsaw/pizzapp-by-rohit.herokuapp.com | de16dcde62cad292d0ffaa844557a062a29f8b05 | 2ae56d4ef1e04d306e8ee6ef407773a190f9d57d | refs/heads/master | 2021-06-11T15:53:20.568840 | 2021-02-27T15:57:26 | 2021-02-27T15:57:26 | 159,865,041 | 1 | 0 | null | 2021-06-10T21:02:16 | 2018-11-30T18:45:49 | HTML | UTF-8 | Python | false | false | 539 | py | 0003_auto_20180923_2018.py | # Generated by Django 2.0.3 on 2018-09-23 20:18
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('orders', '0002_auto_20180923_0725'),
]
operations = [
migrations.RenameField(
model_name='regular_pizza_price',
old_name='pi... |
9bde8ddb90f8bbff4ec03df9a2f177b19323745b | 8eef99280d8c821ac7ea8b275140e356f84bc7df | /Lab Exercise 10.21.2020/Extra/graphics12a.py | cf9b6ca74bd8861ec6ed0ef93bcdd98335cfaf7e | [] | no_license | nmessa/Python-2020 | 7f609f383b6771bc77ea4b82be381beacb0f0fa0 | 8860a3563a89596becf897a2763a169be7f3027f | refs/heads/master | 2023-04-03T22:37:02.221375 | 2021-04-18T15:20:03 | 2021-04-18T15:20:03 | 269,480,165 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | graphics12a.py | #Author: nmessa
#Date: 10.4.2017
#Animates a drawn graphic instead of a bitmapped graphic object
import pygame, sys
pygame.init()
screen = pygame.display.set_mode([640,480])
screen.fill([255, 255, 255])
#my_ball = pygame.image.load('beach_ball.png')
x = 50
y = 50
x_speed = 10
y_speed = 10
radius = 30
#py... |
5bfa4ce42478e526395d69b705e71995b453307e | 620d9286964d973241f75ef15955312bb4833796 | /tests/test_load_airflow_modules.py | 04476b5c44b9fa3acc361284b2c568f70031ce5c | [] | no_license | jpmarques66/AirflowKuberentesDebugger | 9e4ed0b12a740ac6775577ed7aa29f7b7c866dbc | 19f49b7471438bee5e99e121417d7723a3354547 | refs/heads/master | 2022-04-10T19:45:39.453207 | 2020-03-31T15:56:58 | 2020-03-31T15:56:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | test_load_airflow_modules.py | import sys
def test_load_airflow_modules(AirflowtoYamlClient):
AirflowtoYamlClient.load_airflow_modules()
assert 'example' in sys.modules
def test_load_multiple_airflow_modules(AirflowtoYamlWithoutDefaultArguments):
AirflowtoYamlWithoutDefaultArguments.load_airflow_modules()
assert 'example' in ... |
c90197bbd02ab53d74d5e6d3c9def26b42fb7f2b | aab87912118ddd0e4c82bfb210f616126f73de45 | /OpenCV_Tutorials/basic_operations_on_images_tutorial.py | 82981caaf3c3505cb47aa306b8604e54a1778b75 | [] | no_license | dalehuangzihan/vidBarcodeReader | 8d27fe63f4efe18b330d5dcc52d60f970c8d633e | 1aa4d431eafe7fc20a8f3d563b8ab90c0bd2a074 | refs/heads/main | 2023-05-25T06:16:56.600163 | 2021-05-31T06:56:16 | 2021-05-31T06:56:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,681 | py | basic_operations_on_images_tutorial.py | import numpy as np
import cv2
img = cv2.imread('messi5.jpg') # is an image matrix
img3 = cv2.imread('opencv-logo.png') # is an image matrix
print(img.shape) # prints a touple of number of rows, columns, and channels
print(img.size) # prints the total number of pixels in the image
print(img.dtype) # prints Image datat... |
56db784740c9c7a629ffdf9b187df9088637630e | a519c248ccac7cfb4c934b5ad1159f4937117fba | /Strings/pig_latin.py | 526d1b09035ef7f65ee7f54e8a1cfcf98804db05 | [] | no_license | kaci65/Nichola_Lacey_Python_By_Example_BOOK | 1ae5654b82c01e320eaf8d1e41fb03804c0786fc | 2cc18d2d8351a990cee31e253c4bcb298ba4c266 | refs/heads/main | 2023-04-12T18:16:03.663399 | 2021-05-02T14:34:00 | 2021-05-02T14:34:00 | 346,003,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | pig_latin.py | #!/usr/bin/python3
"""Change user input into Pig Latin"""
word = input("Enter any word: ")
vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
first_char = word[0]
if (first_char in vowels):
new_word = word + "way"
print(new_word.lower())
else:
first_char = word[0:1]
others = word[1:]
new_... |
6b4c99f23cbf5888c451be26d962cb1ed838cd68 | 3e4f713b9943b842b2ede688c0d24577c6c63249 | /glodon/dlg/dlg_tools.py | 03bb08a5f9e6747b0336bb4f914d50d044747f76 | [] | no_license | 136759790/pyqt | 54ea1e2222c91ee96d1c010d9191292d09fd702e | d3e2c69b831f5f9b277880feb5a04b03396d164e | refs/heads/master | 2020-08-29T00:10:01.071213 | 2019-11-07T09:57:37 | 2019-11-07T09:57:37 | 217,861,570 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | dlg_tools.py | from PyQt5.QtWidgets import QDialog
from glodon.dlg.Ui_dlg_error import Ui_dlg_error
class DlgTools():
def __init__(self):
super().__init__()
self.dlg = QDialog()
self.ui = Ui_dlg_error()
def error(self,msg):
self.ui.setupUi(self.dlg)
self.ui.text_msg.setText(msg)
... |
cfa3fd8715eb09fa7aab63c57c0d73c00835d0c9 | f426bd96a71b5f58bc9a702c09f52412736c8ba1 | /functions/PositionLocator.py | 98a201a7b94062b175a044db86547d8d83a15059 | [] | no_license | palnikhil/hacknitr3 | 6c82ee6e685202b99e8d6843b451d99e73e95dd9 | 5dc3b5e2c3c30249a1b33adcd4a2a16eecb78298 | refs/heads/main | 2023-08-20T18:45:54.926419 | 2021-10-30T22:07:19 | 2021-10-30T22:07:19 | 422,900,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,522 | py | PositionLocator.py | import cv2
import mediapipe as mp
mp_drawing = mp.solutions.drawing_utils
mp_holistic = mp.solutions.holistic
lane = 'middle'
# For webcam input:
cap = cv2.VideoCapture(0)
loop_counter = 0
going_left = 0
going_right = 0
with mp_holistic.Holistic(
min_detection_confidence=0.5,
min_tracking_confidenc... |
2ea0ae6819bee3434cfbb27cedf1fcc0f79a4ee8 | 3e6c0eabef9e0ee841428830f530777cd2d69f76 | /object_detection_using_cvlib.py | 96c2f84a76563224eb69cf554d29fee300864db3 | [] | no_license | chiru-ece123/Object-Detection-using-cvlib | bd6d03a6ad31db37467fc0fa0b0b03f98f328204 | 96540d44d035425e68a032e7ec8431f63bb8dd3d | refs/heads/main | 2023-06-14T17:26:18.738604 | 2021-07-03T16:21:17 | 2021-07-03T16:21:17 | 443,728,766 | 1 | 0 | null | 2022-01-02T09:39:34 | 2022-01-02T09:39:34 | null | UTF-8 | Python | false | false | 802 | py | object_detection_using_cvlib.py | # -*- coding: utf-8 -*-
"""Object detection using cvlib.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/10zAUMzjOc5T7ZqzFodQdjrxluVxFnT2e
"""
#pip install cvlib
#!pip install opencv-contrib-python==3.4.13.47 --force-reinstall
import cv2
import ... |
2773cb31b88a0deccb49e3fd8096a667f55ceaad | 614cad3588af9c0e51e0bb98963075e3195e92f5 | /tools/__init__.py | ec3ce9bca170529125ab8f7e260c47514e0ae69d | [] | no_license | dragonlong/haoi-pose | 2810dae7f9afd0a26b3d0a5962fd9ae8a5abac58 | 43388efd911feecde588b27a753de353b8e28265 | refs/heads/master | 2023-07-01T14:18:29.029484 | 2021-08-10T10:57:42 | 2021-08-10T10:57:42 | 294,602,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | __init__.py | # print('we are using dataset init!!!')
import sys
TRAIN_PATH = "../"
DEPLOY_PATH = "../deploy"
sys.path.insert(0, TRAIN_PATH)
|
04836a6fefed7cc588e73f4d9e1a4b4daad76f73 | ebc8fdd44f58b5197df98f942defe87d12a3cf7f | /myschool/wizard/__init__.py | c92a2be86499f484bb398874d759b770a28f8f2b | [] | no_license | Brinkyllk/mySchool_src | e2d59197201efad2673104a12e623214bcc8bd87 | f1f76cbf7466ddd66168feff042b17f090f43c4b | refs/heads/master | 2016-09-01T05:09:15.540202 | 2015-09-14T04:42:25 | 2015-09-14T04:42:25 | 43,157,351 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | __init__.py | import generate_time_table
import op_crm_employee_performance_analysis
import op_crm_lead_analysis
import op_enrollment_analysis
import op_promotional_activity_analysis
import op_followup_actions_detail_analysis
import op_inquiry_modes_analysis |
60e99c23e6c2b899531c9f42d3dcb1847951ce46 | f17d806f570a9e5bdf405db8a31b5d6060f10aff | /CodingDojo/Exams/belt_exam/apps/quote_app/migrations/0002_auto_20190419_1225.py | b85c5b24361fd6f95daea213233d84e8767fe70e | [] | no_license | bryonb97/Coding_Dojo | d769e71a9f8fd82b4d0df55f18bb4c336bc94a51 | 7d9170cb144c0b8a43a33f506d575fab0872e131 | refs/heads/master | 2022-01-08T11:34:24.619690 | 2019-05-17T15:49:49 | 2019-05-17T15:49:49 | 176,362,864 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py | 0002_auto_20190419_1225.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2019-04-19 17:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('quote_app', '0001_initial'),
]
operations = [
migrations.AlterField(
... |
7fcd18fea73d7c83d0d0267a9760ffc16d091d70 | 5a2e2cf68be8db9997672e50c84b531cc6405026 | /averageofallpixels_annatest2-workingloop.py | acddac8c8c31929af6de72a866226464519161e0 | [] | no_license | duyt1001/SciFair2018 | 4e6cb25d4060e3386cedb3dacebe51a777a113b0 | 4abfbaf8fe991983c34b71a47d5f61327a165c88 | refs/heads/master | 2020-03-31T04:15:30.383741 | 2018-10-13T19:58:49 | 2018-10-13T19:58:49 | 151,897,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 866 | py | averageofallpixels_annatest2-workingloop.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import cv2
import numpy as np
def scaling(x,minimum,maximum):
y = x + 99 * maximum * (x-minimum)/(maximum-minimum)
return y
myimg = cv2.imread('/Users/anna/Desktop/gobidesertsand.jpg')
avg_color_per_row = np.average(myimg, axis=0)
avg_color = np.average(avg_col... |
d8d99964141c96b0981061a929bd29cbf3aa49fc | cf7e807e64202ef9d009d43dc3590c8bc598ded0 | /src/004.py | 2bab49eb685a63d13e773f492117ea72e172589a | [] | no_license | BarishNamazov/projecteuler | 4df5cfd9a4161832efbf24dfae68a86d4ba361a6 | a274a96e273f6b43d8b5007c285ec714739e846b | refs/heads/main | 2023-03-12T08:02:22.471135 | 2021-03-03T05:52:17 | 2021-03-03T05:52:17 | 335,931,892 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py | 004.py | res = 0
for i in range(999, 99, -1):
for j in range(999, 99, -1):
if str(i * j) == str(i * j)[::-1]:
res = max(res, i * j)
break
print(res) |
848a1fa43bd1a324b8b0e5715d052448e7f47032 | 29e9787d009bb41d5ef391223c686489c634aec9 | /剑指OFFER/对称的二叉树.py | f480e1c8c33f3bed17cad4f42ba7027b548969d7 | [] | no_license | Yaphel/py_interview_code | 7df898e4e6478ee991f10b47a9507d3d3af903f7 | b0c359cd135d4102ae087124e15b86e91b508abf | refs/heads/master | 2020-06-13T13:33:50.196148 | 2019-07-12T05:46:39 | 2019-07-12T05:46:39 | 194,673,118 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | 对称的二叉树.py | #制造一种遍历方式:中右左
#对照前序遍历
#遇到空子孙时也打印出来
|
95911b8ce275dccdc9b3d486803db7a484dcc9f8 | 671ae4ffd7a64f53a4479ea6e9072494b7839ef2 | /plsd.py | d2be33324a06f30af4df89619269bcf1f3ad2032 | [
"BSD-3-Clause"
] | permissive | xuhongzuo/plsd | 25f9ca6d993991d51c8286cb1c88271c98426cd6 | 8319a2dc6982e68c69cea96f1e8b29d6c4488c73 | refs/heads/master | 2022-11-13T07:49:17.395581 | 2020-07-06T02:49:24 | 2020-07-06T02:49:24 | 276,807,028 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,167 | py | plsd.py | """
@author: Hongzuo XU
"""
import numpy as np
import utils
import torch
import classification
from numpy.random import RandomState
from imblearn.under_sampling import RandomUnderSampler
from imblearn.over_sampling import RandomOverSampler
from Net import MLPDrop, MLPDrop2
from log import logger
class PLSD:
de... |
17f6ed499f73e5378339a83b0c6a693869159f93 | b66bc76b4c65c201732100b16748ee8a5c3110fa | /teacher/views.py | d0bf083d2d0ac66f7f56ba67464e36b70df9c3f2 | [] | no_license | neeraj9194/school-app | d114ab2ffcf64d00c7433f36c8298792af5e089e | 03d10d9186f94aad57915f6ef9e7cf839b15ea38 | refs/heads/master | 2022-12-06T15:22:40.359733 | 2020-08-10T20:35:19 | 2020-08-10T20:35:19 | 285,635,688 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,944 | py | views.py | from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
from django.views.generic import CreateView, UpdateView, DeleteView
from teacher.forms import TeacherForm
from teacher.models import Teacher
class TeacherView(LoginR... |
24c4a7bc41cba9d4cd8730d1980625e08c555f4b | e5ce1b1e34f496c166ffddcb52f36481cd37e5f7 | /RIP-MD/libs/hbond.py | 747b5a20dd9861b0d43301e5f9a412549d14129c | [] | no_license | DLab/RIP-MD | 7492fd6e198a3cf7f0158a2ca3db78d40382418a | 08ec2a72ec4f388fbccc24124f19a9b60b152f5b | refs/heads/master | 2020-03-21T14:52:40.956151 | 2018-06-26T20:20:19 | 2018-06-26T20:20:19 | 138,680,506 | 12 | 7 | null | null | null | null | UTF-8 | Python | false | false | 2,393 | py | hbond.py | import multiprocessing as mp # to parallelize jobs
import sys
import MDAnalysis
import MDAnalysis.analysis.hbonds as hbonds
import warnings
warnings.filterwarnings("ignore")
def parallelParser(pdbFrameName): #arg: list with universe, start and stop frame, distance and angle to calculate hbond
sys.stdout = open(outp... |
fa9550a63d047f55dd3f48469790cda48d80b57b | 9a6d75512b8a350476c1fe4444f5c358996b8f18 | /pr.py | 5dd1cbde0967e9082a271e876d2b96f77be9d7af | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | templeblock/speech-demo | ed0233c6179b89c2ab98ac5b067efd8bac39697b | da20637b48d901c7e6e87a522eb6c6896c663111 | refs/heads/master | 2020-06-14T10:17:36.644900 | 2018-08-29T19:17:36 | 2018-08-29T19:17:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 91 | py | pr.py | So you can see if we take into account network delay we can scale up our model near liner.
|
86300c5d1cbb3150f1cc368840826375d6bed46e | 7519cca3b4179cc394ece0fff5121b82c012cfc7 | /common/app_urls/__init__.py | 87267c877105afaafb21bef60d50b8c2b4e183b8 | [
"MIT"
] | permissive | timgates42/Django-CRM | fc0e27b0e1edaac9554b0e9d94f7a6cd29348926 | 52d972be3e95c5bd2068cd15490774e7b2f0c4f7 | refs/heads/master | 2023-03-21T12:31:19.681108 | 2022-03-09T04:14:39 | 2022-03-09T04:14:39 | 245,112,328 | 0 | 0 | MIT | 2020-03-05T08:51:49 | 2020-03-05T08:51:48 | null | UTF-8 | Python | false | false | 693 | py | __init__.py | from django.urls import include, path
app_name = "common_urls"
urlpatterns = [
path("", include(("common.urls"))),
path("accounts/", include("accounts.urls", namespace="api_accounts")),
path("contacts/", include("contacts.urls", namespace="api_contacts")),
path("leads/", include("leads.urls", namespace... |
c83e8b6854e57901af97656d15b600b2e18603cd | dd1b092a182ee6be842493115e459afdb2211a70 | /python/数科项目/房价中位数/1.获取与初探查.py | 7ddf468f639508b5873223f929af1737c881c949 | [] | no_license | qingfengliu/statics_use | e8db1721b73d8567ca5947d52f3c81bd9d8dfd83 | ba89e6d657f0fdc0d4246865709ffddc443ad3fc | refs/heads/master | 2022-12-10T19:41:32.965452 | 2022-12-01T02:04:09 | 2022-12-01T02:04:09 | 207,328,002 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,577 | py | 1.获取与初探查.py | # Python ≥3.5 is required
import sys
assert sys.version_info >= (3, 5)
# Scikit-Learn ≥0.20 is required
import sklearn
assert sklearn.__version__ >= "0.20"
import pandas as pd
# Common imports
# To plot pretty figures
# %matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
import os
import tarf... |
68f7df2e2857c8945aa7eacfaa287634112896bb | d38cbf608d65d7049ad77ff87f18292c66e64be4 | /src/data/OrbitasV4.py | a6829a80e47761f37edb600453a38fe58527b75a | [
"MIT"
] | permissive | j1996/EPM_UCC | bfda1d8f018fec8b394e16103638c32fdeab0000 | cf2218c7681966963a179aea043328a2343f92fb | refs/heads/master | 2022-06-16T17:44:45.828551 | 2020-05-12T22:47:57 | 2020-05-12T22:47:57 | 257,706,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,904 | py | OrbitasV4.py | """
Orbitas
Basicamente un monton de utilidades creadas para el programa principal
Returns:
[type]: [description]
"""
from astropy.coordinates import get_sun
from astropy.time import Time, TimeDelta
from poliastro.bodies import Earth, Sun
from astropy import units as u
from poliastro.twobody import Or... |
f2f4ad1ed84fc2967cd2664d7a75cae2dd454a08 | f91c080780c5e82a03f92deee49ed9d1c5fe536d | /src/model_construction/cnn_model.py | fea8ae9d5578d074011580c49692b91db38f0336 | [] | no_license | zhengxueming/cnnMirTarget | 7368ffed777b076c7cef24ff4c9f8ca31c06f646 | 2a0d6a58ea17067ea5bb666133349364bcba1894 | refs/heads/master | 2020-04-18T02:50:45.114926 | 2019-01-25T08:57:00 | 2019-01-25T08:57:00 | 167,177,940 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | cnn_model.py | """
module: construct the CNN deep learning model
"""
import keras
from keras import regularizers
from keras.models import Sequential
from keras.layers import Dense,Activation,Dropout,Flatten
from keras.layers import Conv1D,MaxPooling1D
from keras.optimizers import Adam
#function: design the model structure
def cn... |
b55b1c226f1e6f0334e3f186c5acdfcbc3d3539c | 15a7daca02bae3594e74779474b457ce9f45b2d6 | /UI-Design/keylogxmain2.py | e1b290690ed6545846b46dfe6cd1c54d560da467 | [] | no_license | yuhisern7/Keyloggx | c3a14beb543e04d4b99bc675a2ba849a629e344e | f327031bf3683c847205f6bd3280f0cd4aa6729c | refs/heads/main | 2023-03-11T06:20:18.870445 | 2021-02-23T17:09:42 | 2021-02-23T17:09:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | keylogxmain2.py |
from PySide2 import QtCore , QtGui , QtWidgets
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import QApplication
import main
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.ui = Ui_SplashScreen()
self.ui.setupUi(self)
... |
9ed1579213b9946205cf8d68982f4420d91732e1 | 30b504c31e50fcac9da10f446ec7a6443b83e41b | /article/migrations/0009_auto_20190222_0752.py | 4414acd6a7c9df1a77894573c93d24a8502a0541 | [] | no_license | chongeva/flatwhite | 1539679fab5711c582330bcf44c2e2d80b085d10 | bf33c905e396fcadfd1435e5953d128dcb069498 | refs/heads/master | 2020-05-22T13:03:20.841787 | 2019-05-28T15:29:11 | 2019-05-28T15:29:11 | 23,926,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 225 | py | 0009_auto_20190222_0752.py | # Generated by Django 2.1.7 on 2019-02-22 07:52
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('article', '0008_auto_20190222_0721'),
]
operations = [
]
|
cd9f427f05be01bf54c5f11230670ae7b1a4a8ec | 660d24268591ecb54e9f7885a195bb7f37f6836a | /DataStructure/Strings/Prob7UniqueAndSort.py | 4fa76566917e6bc427d0931ba4716f5e2880a832 | [] | no_license | mandar-degvekar/DataEngineeringGCP | 3e924c3438fcdb3db7aa3fe14ab5b60a9a796554 | 086a82d4fb66c4ed70337d7715dc9ad32ddd46df | refs/heads/master | 2022-07-15T19:37:53.052570 | 2019-06-25T09:59:44 | 2019-06-25T09:59:44 | 192,692,729 | 0 | 0 | null | 2022-06-21T22:11:24 | 2019-06-19T08:37:21 | Python | UTF-8 | Python | false | false | 159 | py | Prob7UniqueAndSort.py | inp=input('Enter strings coma separated to add in list:')
list=inp.split(',')
l=[]
for i in list:
l.append(i)
print(l)
d=dict.fromkeys(l)
print(sorted(d)) |
5d96f97ff0a4fd12965aed5fe13b62741e82c3dd | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/copyPaste/multiLine/IndentIfElse.dst.py | 777dfb0e707d90350292ee238f8204760efdbf57 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 51 | py | IndentIfElse.dst.py | def f():
if True:
a = 1
<caret> |
8d65fd95b5dfe099cc8eeef3b44d1ee647c789b5 | 99a2d82d2a10c0af77731885f80307edcdc48535 | /dev/git_contains | 8016e1029ad2c245c537f9dc6495a3ea3c58e839 | [
"WTFPL",
"LicenseRef-scancode-public-domain"
] | permissive | mk-fg/fgtk | be60c102f6ad6cd0d0e364c3863c36a1902a15a3 | 90de180b0d4184f3040d85a4ff2ac38319a992af | refs/heads/master | 2023-09-06T08:41:33.852815 | 2023-08-19T07:25:54 | 2023-08-19T07:25:54 | 3,831,498 | 149 | 46 | null | 2017-08-15T19:23:59 | 2012-03-26T09:58:03 | Python | UTF-8 | Python | false | false | 3,614 | git_contains | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import print_function
import itertools as it, operator as op, functools as ft
from contextlib import contextmanager
from subprocess import Popen, PIPE, STDOUT, check_output, CalledProcessError
import os, sys, string
def results(found, missing, quiet=Fals... | |
3079c39e86668bff96724d6a1ef41ce13745eff9 | 1ecde454bcb7a43ecc03bd2f4cfe2fd04651783d | /modularity.py | 3e54db6a5e5a664b8409c8c7b55d701f99bec279 | [
"MIT"
] | permissive | tysonpond/social-networks-collection | b5261a026ff01cb171e29ce34a46040435701525 | 34ec97abe2bb9a0565c418045bfb07c26f47e08a | refs/heads/master | 2023-01-11T19:37:33.621155 | 2020-11-18T18:36:18 | 2020-11-18T18:36:18 | 291,887,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,833 | py | modularity.py | import numpy as np
import networkx as nx
from scipy import sparse
from scipy.linalg import eig
from itertools import product
# Code is not my own
#Source: https://github.com/zhiyzuo/python-modularity-maximization/blob/master/modularity_maximization/utils.py
def get_modularity(G, community_dict):
'''
Calculate... |
8932a12f47ae54f619fc7c3aad411aa0bbe4af0f | 04aa21aed4e8e55a6e99fc98ccc8006a72781504 | /chemistry-formula/lib/parser.py | d54317a81fe75aa740527053910e05bd72fe54c8 | [] | no_license | codejoust/Stuff | 220fb57fa9a094186bad4253a4133821bc536f13 | a2f0342ed42c9cf100bc0b73951736c3c670756f | refs/heads/master | 2021-01-18T13:48:53.582032 | 2010-04-23T16:56:57 | 2010-04-23T16:56:57 | 600,248 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,068 | py | parser.py | import re, sys, time, html
from re import compile as reinit
import parser
class TreeParser:
"""
Parse a full formula, splits into elements or products and reactants
"""
pattern = reinit(" ?(?:=|\-)*> ?")
def __init__(self, string):
sides = self.pattern.split(string)
if len(sides) ==... |
2a1338e73ea2f79281b638099f256a565bc7951b | 745ba3a708ac8bc667857db59b316dd6c3883f26 | /final/taipower/analysis/migrations/0006_alter_peaksupportdemandhistory_powerplant.py | 8c4c09852e3b618b94fde46a75428f5b5ff630b8 | [] | no_license | nucktwillieren/big_data_course | 836dfcec2ada5132e7f176c4ed67cc7ea3e5a52b | 84153d4c219cd1ae8bede73c7d1508cdff262e8c | refs/heads/master | 2023-06-06T02:49:46.611773 | 2021-06-23T07:31:41 | 2021-06-23T07:31:41 | 379,402,018 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | 0006_alter_peaksupportdemandhistory_powerplant.py | # Generated by Django 3.2 on 2021-06-23 00:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analysis', '0005_auto_20210623_0413'),
]
operations = [
migrations.AlterField(
model_name='peaksupportdemandhistory',... |
09c481300b27f47df6babc68f863452759babcbd | 2c0e8f2649b486eede6b8d48f0eca38f0c2d2b5e | /83.Remove_Duplicates_from_Sorted_List_2.py | 8f9b9cde0c4b597bb52ea462a51d26ad46e4c31d | [] | no_license | daquexian/leetcode | 164744779ba91870c0a33e953083e599a5efba0f | d1d49a34b3c2a1ba5c6962923fc74be9a1eff668 | refs/heads/master | 2021-01-16T23:54:48.346031 | 2017-02-03T15:59:40 | 2017-02-03T15:59:40 | 59,496,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,155 | py | 83.Remove_Duplicates_from_Sorted_List_2.py | # similar with No.82, only delete one line
import sys
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def deleteDuplicates(self, head):
"""
:type head: ListNode
:rtype: Li... |
10897efee7eaf325689a3f39a908791c67485b48 | fcc7ae9437ea9542c549f1ae18ec9f4d44ae83c1 | /houseagent/core/web.py | 6132eb8c4d37085c567a55f184c03e106d34c9f9 | [] | no_license | MechaMonk/HouseAgent | 679dada17c3f4aed2580512b9ac4665b5cf95010 | 22a30d9260dd6308a87629ca2df2b88a81a3e09f | refs/heads/master | 2021-12-09T03:07:04.373959 | 2016-04-22T07:49:40 | 2016-04-22T07:49:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,976 | py | web.py | import sys
import houseagent
import datetime
import json
import os.path
import imp
from twisted.internet import reactor
from twisted.web.server import Site
from twisted.web.static import File
from pyrrd.rrd import RRD
from mako.lookup import TemplateLookup
from twisted.internet import defer
from twisted.internet.defer ... |
bc412d23d894ff281b73b105fab3b2b8a7764279 | eb4c9b605b7196c5a5df7e64f1c2f5496cd18502 | /WiimoteTracking/PythonDriver/linux/gui.py | 6d8c4dfb4485288c6f299fb8ab9e0affe1265616 | [] | no_license | kineticgar/htdp | ec3a29b3b3b0ce8e17214ff798dfc374f451a0a9 | 57d4d4d909929b078b60533661942e59271b6299 | refs/heads/master | 2021-01-19T13:03:22.765748 | 2008-08-25T19:39:55 | 2008-08-25T19:39:55 | 38,851,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,843 | py | gui.py | ## This file is part of the htdp project as part of Google Summer of Code
## Copyright (C) 2008 Chris Nicholls
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the Li... |
89b9515b1d919b808e5099d28826fa2cde2e4120 | 4cb566fca1326514dcc15660cd18563e903a1a00 | /app/models/city.py | c89bbec1f0f61c7488d6055fd142b8f339845f53 | [] | no_license | maan-git/conta-comigo-app-back | 49574f341c7e564e05c1709bf1d41cad1d18d392 | d353acd89f3ad477354a1dd991ab390ed738c376 | refs/heads/master | 2023-08-11T22:34:23.362893 | 2020-06-21T14:17:56 | 2020-06-21T14:17:56 | 249,272,177 | 0 | 0 | null | 2023-07-23T09:42:37 | 2020-03-22T21:04:23 | CSS | UTF-8 | Python | false | false | 1,003 | py | city.py | from django.db import models as django_models
from django.utils.translation import ugettext_lazy as _
from app.models.state import State
class City(django_models.Model):
description = django_models.CharField(_("Description"), max_length=150)
active = django_models.BooleanField(_("Active"), default=True)
c... |
0c02803597421669faaea714a32c2d33f4b6027b | adff6c42bf3f66b77a3bef3579079184a8f65894 | /supriya/examples/grey_wash/sessions/__init__.py | 187372892d1c263c86fd575e6dd3c2236ea728c3 | [
"MIT"
] | permissive | migush/supriya | 4a80e745a3933a88a8ff23f7e955750f64f27ca9 | af70a474f23b850635ba47ea85eddffec828cce3 | refs/heads/master | 2020-09-01T08:53:50.343061 | 2019-07-16T23:45:29 | 2019-07-16T23:45:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | __init__.py | from .chants import chants # noqa
from .choral_wash import choral_wash # noqa
from .lost_and_found import lost_and_found # noqa
from .noise_wash import noise_wash # noqa
|
d994d18b269793bd7efc6919f186b35b2e7adfab | 9f9856cea38c946542d7c6f70d77522df3480313 | /full-test/test4-gen.py | 136ba6401333c963952c7e877bf4855f3145bef1 | [] | no_license | MaciejPurski/protocol-description-language | e9cdf547b0847a4c7629fe3d6dca5590b325b44e | 34d3e0c096f618cf8b160ddc52e530e679c45d26 | refs/heads/master | 2020-03-11T08:51:32.022280 | 2020-01-08T11:29:20 | 2020-01-08T11:29:20 | 129,894,570 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | test4-gen.py | import sys
from struct import *
f = open("test4.bin", "wb")
packet_a = '=B 8s'
packet_b = '=B i'
packet_c = '=B 6b'
packet_d = '=B 2b 10s i4'
def a():
f.write(pack(packet_a, 0x01, "abcd"))
def b():
f.write(pack(packet_b, 0x02, 122))
def c():
f.write(pack(packet_c, 0x03, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06))
def... |
fae1055c29616f882a28b7abc7487ecd7174c72f | 0c98aa5bdd6e3d944607f119424f42cc216e6d9a | /tests/fixtures/project_django/demo_app/urls.py | d0d7a837442aaa3316e32d0b36ba4a901b0a1e54 | [
"MIT"
] | permissive | adelpopelkova/freezeyt | 3620a23a93098450ec194cb0c5f0348a2cf3f2d8 | 33952639fbec4d42d20d3b0cb9f0ff0cc8aee378 | refs/heads/master | 2023-07-17T14:05:32.772361 | 2021-08-19T06:35:35 | 2021-08-19T07:01:02 | 279,384,663 | 0 | 0 | MIT | 2020-07-13T18:43:03 | 2020-07-13T18:43:02 | null | UTF-8 | Python | false | false | 503 | py | urls.py | from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import views
urlpatterns = [
path('', views.index, name='home'),
path('second_page.html', views.second_page, name='second_page'),
path('third_page/', views.third_page, name='third_page'),
p... |
31d0ce524055d9b48316c8020644c379c14c54c0 | 11436365cc9ad7f2e7f5465d9263f9b8fb9d8a27 | /plugin.video.plus7/resources/lib/config.py | edf382fc4daed8f18de2e9960dc183aa3d6523b1 | [] | no_license | golD-Line/repo | a6e208245d086c49e5dd335f2aa64f8f25d6f47b | e9432ca611a3713b842e2ea4fa63f2656317a08f | refs/heads/master | 2020-08-15T13:42:04.783712 | 2019-10-16T12:40:22 | 2019-10-16T12:40:22 | 215,352,295 | 0 | 0 | null | 2019-10-15T16:59:18 | 2019-10-15T16:59:18 | null | UTF-8 | Python | false | false | 4,458 | py | config.py | #
# Plus7 XBMC Plugin
# Copyright (C) 2014 Andy Botting
#
#
# This plugin is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#... |
6eb60ba5d99c5b6bc8b85de88ba3a250c2ea6aea | 86f72838614c5e475f81660c85c897708c2cf5c8 | /quotrapp/authors/routes.py | fbab8a16a6bd81e92f7ca673062fe5455e4f7e87 | [
"MIT"
] | permissive | joshbduncan/quotr | 0195452f5e2fd18fca47e993af6441da77bdf63d | dc35cdffe3133f07e7d2471fa40d5291f16ceee2 | refs/heads/master | 2023-07-16T10:29:43.239319 | 2021-08-18T04:47:53 | 2021-08-18T04:47:53 | 294,855,496 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,094 | py | routes.py | from flask import render_template, abort, Blueprint, current_app
from sqlalchemy import asc, desc
from quotrapp import db
from quotrapp.models import Quote, Author
authors_bp = Blueprint('authors_bp', __name__)
@authors_bp.route('/authors/<author>')
def quotes_by_author(author):
if '-' in author:
author... |
7c3979a0b3904774a5dd4748fc939001e7bf2df3 | 6685cc7e49ed8fdb8c40539d04004dc021dd6135 | /Python Scripts/drawing.py | 245d396803afe4fc5b0a39a86b6f8f7984ffc319 | [] | no_license | bulatao/Data-Science-Classes | e6d25ac0c936ce170aa84de1d267f3fa60b4cef5 | afaaea3c1a716efe86e9db7737a210a16b1cfbb0 | refs/heads/master | 2020-04-14T13:04:12.692899 | 2019-05-31T00:40:01 | 2019-05-31T00:40:01 | 163,858,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | drawing.py | import turtle
t = turtle.Pen()
t.speed(0)
def draw_square(length):
for i in range(4):
t.forward(length)
t.left(90)
def draw_triangle(length):
for i in range(3):
t.forward(length)
t.left(120)
def draw_pentagon(length):
for i in range(5):
t.forward(... |
ad68e0be1a329f58d204d3a1e04d64ac2bfb1267 | 03b722a168c751c70df7ea9b6334e4edcd8c7ba8 | /murid.py | dc70deaac2c2be6f507038aa3e0b6c41d9561a8a | [] | no_license | PraktikumPPLKOM2/ClassDiagram | a7bd47815853f0f41826c701ae52843fd21c7679 | 1dd6371c99d08a2fcd55f009f8caf7263a7a33c8 | refs/heads/master | 2023-01-23T15:51:14.952310 | 2020-11-28T13:34:24 | 2020-11-28T13:34:24 | 310,494,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,383 | py | murid.py | from tugas import tugas
class murid:
def __init__(self, USER):
self.USER = USER
self.tugas = {}
self.kelas = {}
def getName(self):
return self.USER.getName()
def getUname(self):
return self.USER.getUname()
def getID(self):
return self.USER.getID()
... |
c819f47d6f019ff5bbcea8ae4e17895c50beefb0 | 4691ca5df0fda2858be86de90c10b9d36e33f435 | /Parcial/puntom.py | 9af9159401a2d35e7af366d2dff96c983c1c6b10 | [
"Apache-2.0"
] | permissive | andersonvelasco/Programming-2020B | bd8a05100559cc14695f0ed0ddc507f6356a6fab | bd843a406353b55ca83b9684c394aec1556aaddc | refs/heads/master | 2023-02-04T05:54:29.699467 | 2020-12-17T21:37:15 | 2020-12-17T21:37:15 | 296,182,633 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,861 | py | puntom.py | Script description
Se requiere de un programa que solicite por pantalla los datos de un empleado, al finalizar la solicitud de un empleado, debe preguntar si desea ingresar otro, al presionar SI/si continuará solicitando la información de un nuevo empleado, y si presiona NO/no, finalizará la solicitud. El sistema debe... |
bcc02ab10024251e0573024e505f99f67596f9e7 | 2c2ccb191d46d3210355a0f5098c9c36fffda166 | /util/image_pool.py | 8203d773de5dfafe3b26addcb3fe3f0fc278c9b5 | [] | no_license | pixel-lt/MyEnhanceProj | 16851c309dceb8afa97f874f49fdba0b3cf61850 | d1c7730c0f406e5b2e2f7570623f915fc5644b98 | refs/heads/master | 2023-04-01T07:30:16.076642 | 2021-03-31T12:28:08 | 2021-03-31T12:28:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,825 | py | image_pool.py | import random
import numpy as np
import torch
import heapq as hp
class ImagePool():
''' 用于将训练过程生成的fake图象缓存到一个列表,每次训练判别器,从缓冲池中随机选一个训练判别器。
本项目的gan代码中未使用
'''
def __init__(self, pool_size):
self.pool_size = pool_size
if self.pool_size > 0:
self.num_imgs = 0
self.... |
0788f668da01faaf84cb9ee8d3a4427a8f62b854 | a56252fda5c9e42eff04792c6e16e413ad51ba1a | /resources/usr/local/lib/python2.7/dist-packages/Bio/Affy/CelFile.py | db82f4e5d5aadc643bda697d59e1b974f45671ba | [
"Apache-2.0"
] | permissive | edawson/parliament2 | 4231e692565dbecf99d09148e75c00750e6797c4 | 2632aa3484ef64c9539c4885026b705b737f6d1e | refs/heads/master | 2021-06-21T23:13:29.482239 | 2020-12-07T21:10:08 | 2020-12-07T21:10:08 | 150,246,745 | 0 | 0 | Apache-2.0 | 2019-09-11T03:22:55 | 2018-09-25T10:21:03 | Python | UTF-8 | Python | false | false | 6,548 | py | CelFile.py | # Copyright 2004 by Harry Zuzan. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""
Classes for accessing the information in Affymetrix cel files.
Functions:
read Read a ... |
87f24bd4666b450842c3a523b8fb60d4c1707fab | 2d967dd58c2da256590fe8c3d241c1a99b6d8534 | /classify-names/data_feeder.py | 9b01e50db43e5438f98827d01d37aeca1a1cc394 | [] | no_license | nikitazozoulenko/rnn | 7a7c0661a174f690eb697e30f6607fa130dfa86a | 5d2939bc570c4d0f02ed442134737ac5761ccc2e | refs/heads/master | 2021-05-02T10:18:22.359936 | 2018-04-07T16:46:42 | 2018-04-07T16:46:42 | 120,793,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,622 | py | data_feeder.py | import io
import glob
import unicodedata
import string
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
class Lang():
def __init__(self):
self.word2index = {}
self.index2word = {}
self.vocab_size = 0
self.__init_dicts()
def ... |
23ff5b7da621edc1980eddeab1d1b095f0ef3167 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /a55ygB8Bwj9tx6Hym_24.py | 9842315f72bc52e8c5d2bd86024d6a979e00e738 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | a55ygB8Bwj9tx6Hym_24.py | """
Return the smallest number of steps it takes to convert a string **entirely**
into uppercase or **entirely** into lower case, whichever takes the fewest
number of steps. A step consists of changing one character from lower to upper
case, or vice versa.
### Examples
steps_to_convert("abC") ➞ 1
# "abC" c... |
da95f39f2d0a43d3d35f532e4f3b66ea5c1cfd07 | a443602c450aac651b7fa2b06a89b28063ba54b8 | /test/cross_entropy.py | 9ea74e6905cb07adc0e47e4545015b40680dd331 | [] | no_license | pengfeidip/pytorch-faster-rcnn | a84dab4f5c7d2b243dbc86c1e9e84098f693e9eb | 1d4b43bc484ca43be1b81cfda737e46377c03fd0 | refs/heads/master | 2022-12-08T12:25:24.454646 | 2020-08-14T11:18:02 | 2020-08-14T11:18:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 768 | py | cross_entropy.py | import os.path as osp
import sys
cur_dir = osp.dirname(osp.realpath(__file__))
sys.path.insert(0, osp.join(cur_dir, '..'))
from lib.heads.fcos_head import length2class, class2length
from lib.losses import distributed_focal_loss as dfl
from lib.losses import multilabel_softmax_cross_entropy_with_logits as ml
import tor... |
83a032ef388297f40a1023c37464b6d6de942064 | 251f5c092d4b7760cec8c2b6324e5290b917721f | /locations/spiders/vans.py | 8ed8ca6691ad8e51b8bf1f009367a48be394c50b | [
"MIT",
"CC0-1.0"
] | permissive | thomas536/alltheplaces | 663a2441054ba62df6d6e070c19b1ba91f2f4f1f | ac4d4783572d55c0799fe6aeb5f6c0e72fad55fb | refs/heads/master | 2021-11-27T12:21:46.387422 | 2021-09-08T18:33:46 | 2021-09-08T18:33:46 | 242,420,362 | 0 | 0 | NOASSERTION | 2021-09-09T05:00:22 | 2020-02-22T22:25:57 | Python | UTF-8 | Python | false | false | 3,758 | py | vans.py | # -*- coding: utf-8 -*-
import json
import re
import scrapy
from locations.items import GeojsonPointItem
from locations.hours import OpeningHours
from scrapy.selector import Selector
class VansSpider(scrapy.Spider):
name = "vans"
item_attributes = { 'brand': "Vans" }
allowed_domains = ["locations.vans.c... |
96ae9b7313fb0abbe9dd284718009892e240bc2c | ebfd4f2f437e3462305ef993906662624cf8995c | /utils/db_api/add_to_database.py | e02b5e23833c048cb47be7cb5f7f617fcfa68544 | [] | no_license | Aerisphase/TG_BOT-aenturum-BOT_2.0- | 136069004b947e98e985badf965ca82e22cda991 | d124359394abd28ea0c4c66fe821724a442a0e38 | refs/heads/main | 2023-03-12T03:06:20.380996 | 2021-03-02T02:44:28 | 2021-03-02T02:44:28 | 343,623,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | add_to_database.py | from utils.db_api.db_commands import add_item
import asyncio
from utils.db_api.database import create_db
# async def add_items():
# await add_item(name="ASUS",
# category_name="🔌 Электроника", category_code="Electronics"
# )
loop = asyncio.get_event_loop()
loop.run_until... |